Debug LLVM IR in tests

This commit is contained in:
Ayaz Hafiz 2023-05-24 12:41:54 -05:00
parent 9b58c0fb9c
commit bbcd9c3a52
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -298,6 +298,10 @@ fn create_llvm_module<'a>(
);
}
if let Ok(path) = std::env::var("ROC_DEBUG_LLVM") {
env.module.print_to_file(path).unwrap();
}
// Uncomment this to see the module's optimized LLVM instruction output:
// env.module.print_to_stderr();