Skip to content

Commit 9801a59

Browse files
authored
Rollup merge of rust-lang#68881 - eddyb:always-preserve-dbg-vars, r=nagisa
rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a `bool` argument, but there it means something unrelated). Also see rust-lang#8855 (comment). I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to `true` when LLVM *could* optimize them away, so this PR should have no effect anyway. r? @michaelwoerister or @nagisa cc @rkruppe @nikomatsakis
2 parents 8fabe85 + b82f6c5 commit 9801a59

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_codegen_llvm/debuginfo

1 file changed

+1
-1
lines changed

src/librustc_codegen_llvm/debuginfo/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
559559
file_metadata,
560560
loc.line as c_uint,
561561
type_metadata,
562-
self.sess().opts.optimize != config::OptLevel::No,
562+
true,
563563
DIFlags::FlagZero,
564564
argument_index,
565565
align.bytes() as u32,

0 commit comments

Comments
 (0)