Fix debug info for local variables

This commit is contained in:
Sofia 2025-07-25 02:02:55 +03:00
parent 6634597c92
commit 242cf9fb2d
2 changed files with 2 additions and 2 deletions

View File

@ -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,
);

View File

@ -741,7 +741,7 @@ impl mir::Statement {
InstructionDebugRecordData {
variable: var,
location,
kind: DebugRecordKind::Declare(value.instr()),
kind: DebugRecordKind::Declare(alloca),
scope: debug.scope,
},
);