forked from M-Labs/nac3
1
0
Fork 0

standalone: Emit IRRT IR

This commit is contained in:
David Mak 2023-09-29 16:41:32 +08:00 committed by sb10q
parent b6afd1bfda
commit 279376a373
1 changed files with 6 additions and 1 deletions

View File

@ -354,7 +354,12 @@ fn main() {
main.link_in_module(other).unwrap(); main.link_in_module(other).unwrap();
} }
main.link_in_module(load_irrt(&context)).unwrap();
let irrt = load_irrt(&context);
if emit_llvm {
irrt.write_bitcode_to_path(Path::new("irrt.bc"));
}
main.link_in_module(irrt).unwrap();
let mut function_iter = main.get_first_function(); let mut function_iter = main.get_first_function();
while let Some(func) = function_iter { while let Some(func) = function_iter {