From 242cf9fb2d11eeb5e038a11460867a24b9e809d8 Mon Sep 17 00:00:00 2001 From: sofia Date: Fri, 25 Jul 2025 02:02:55 +0300 Subject: [PATCH] Fix debug info for local variables --- reid-llvm-lib/src/compile.rs | 2 +- reid/src/codegen.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reid-llvm-lib/src/compile.rs b/reid-llvm-lib/src/compile.rs index c699c95..1c1cd3d 100644 --- a/reid-llvm-lib/src/compile.rs +++ b/reid-llvm-lib/src/compile.rs @@ -88,7 +88,7 @@ impl CompiledModule { triple, into_cstring(self.cpu.clone()).as_ptr(), into_cstring(self.features.clone()).as_ptr(), - llvm_sys::target_machine::LLVMCodeGenOptLevel::LLVMCodeGenLevelLess, + llvm_sys::target_machine::LLVMCodeGenOptLevel::LLVMCodeGenLevelNone, llvm_sys::target_machine::LLVMRelocMode::LLVMRelocDefault, llvm_sys::target_machine::LLVMCodeModel::LLVMCodeModelDefault, ); diff --git a/reid/src/codegen.rs b/reid/src/codegen.rs index bb5182c..2e64284 100644 --- a/reid/src/codegen.rs +++ b/reid/src/codegen.rs @@ -741,7 +741,7 @@ impl mir::Statement { InstructionDebugRecordData { variable: var, location, - kind: DebugRecordKind::Declare(value.instr()), + kind: DebugRecordKind::Declare(alloca), scope: debug.scope, }, );