use platform-independent tempdir

This commit is contained in:
Folkert de Vries 2022-08-03 21:58:02 +02:00
parent a345649856
commit 8f67129eae
4 changed files with 9 additions and 8 deletions

View file

@ -261,7 +261,7 @@ fn create_llvm_module<'a>(
// Verify the module
if let Err(errors) = env.module.verify() {
let path = "/tmp/test.ll";
let path = std::env::temp_dir().join("test.ll");
env.module.print_to_file(path).unwrap();
panic!(
"Errors defining module:\n\n{}\n\nI have written the full module to `{path}`",