cgen: output .bc file
This commit is contained in:
parent
243e3cc694
commit
86e899e771
2 changed files with 6 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
zig-cache/
|
||||
*.bc
|
||||
*.ll
|
||||
|
|
|
@ -74,8 +74,6 @@ pub const Codegen = struct {
|
|||
try self.genNode(mod, &child);
|
||||
}
|
||||
|
||||
std.debug.warn("cgen: done\n");
|
||||
|
||||
var err: ?[*]u8 = null;
|
||||
_ = llvm.LLVMVerifyModule(
|
||||
mod,
|
||||
|
@ -83,5 +81,9 @@ pub const Codegen = struct {
|
|||
&err,
|
||||
);
|
||||
llvm.LLVMDisposeMessage(err);
|
||||
|
||||
if (llvm.LLVMWriteBitcodeToFile(mod, c"awoo.bc") != 0) {
|
||||
std.debug.warn("error writing bitcode to file\n");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue