mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 07:33:08 +00:00
stage2: C backend: adjust spaces around functions
This commit is contained in:
parent
e1811f72eb
commit
58cfaa5982
@ -341,9 +341,10 @@ pub fn genDecl(o: *Object) !void {
|
||||
const func: *Module.Fn = func_payload.data;
|
||||
const instructions = func.body.instructions;
|
||||
const writer = o.code.writer();
|
||||
try writer.writeAll("\n");
|
||||
try o.dg.renderFunctionSignature(writer);
|
||||
if (instructions.len == 0) {
|
||||
try writer.writeAll(" {}\n\n");
|
||||
try writer.writeAll(" {}\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -382,7 +383,7 @@ pub fn genDecl(o: *Object) !void {
|
||||
}
|
||||
}
|
||||
|
||||
try writer.writeAll("}\n\n");
|
||||
try writer.writeAll("}\n");
|
||||
} else if (tv.val.tag() == .extern_fn) {
|
||||
const writer = o.code.writer();
|
||||
try o.dg.renderFunctionSignature(writer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user