From 279376a373bf33901fd750997bfbbe7dd3a00ec5 Mon Sep 17 00:00:00 2001 From: David Mak Date: Fri, 29 Sep 2023 16:41:32 +0800 Subject: [PATCH] standalone: Emit IRRT IR --- nac3standalone/src/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nac3standalone/src/main.rs b/nac3standalone/src/main.rs index 16f3aaef5..8d7240529 100644 --- a/nac3standalone/src/main.rs +++ b/nac3standalone/src/main.rs @@ -354,7 +354,12 @@ fn main() { 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(); while let Some(func) = function_iter {