diff --git a/nac3standalone/src/main.rs b/nac3standalone/src/main.rs index c2a1d194..66fc8e7a 100644 --- a/nac3standalone/src/main.rs +++ b/nac3standalone/src/main.rs @@ -449,6 +449,11 @@ fn main() { .create_target_machine(llvm_options.opt_level) .expect("couldn't create target machine"); + // Debug print if DEBUG_STANDALONE_DUMP_IR is defined + if std::env::var("DEBUG_STANDALONE_DUMP_IR").is_ok() { + main.print_to_file("standalone.ll").unwrap(); + } + let pass_options = PassBuilderOptions::create(); pass_options.set_merge_functions(true); let passes = format!("default", opt_level as u32);