mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 04:25:05 +00:00
CBE: skip 0 bit integers from function signatures
This was already done for void types, and needs to be done for 0 bit integer types as well to align the rendered function signatures with the effective size of extra.data.args_len as seen by airCall().
This commit is contained in:
parent
2036af94e9
commit
87744a7ea9
@ -839,10 +839,13 @@ pub const DeclGen = struct {
|
||||
try w.writeAll("(");
|
||||
const param_len = dg.decl.ty.fnParamLen();
|
||||
|
||||
const target = dg.module.getTarget();
|
||||
var index: usize = 0;
|
||||
var params_written: usize = 0;
|
||||
while (index < param_len) : (index += 1) {
|
||||
if (dg.decl.ty.fnParamType(index).zigTypeTag() == .Void) continue;
|
||||
const param_type = dg.decl.ty.fnParamType(index);
|
||||
if (param_type.zigTypeTag() == .Void) continue;
|
||||
if (param_type.isInt() and param_type.intInfo(target).bits == 0) continue;
|
||||
if (params_written > 0) {
|
||||
try w.writeAll(", ");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user