Skip to content

Commit aa7e872

Browse files
committed
Auto merge of #68881 - eddyb:always-preserve-dbg-vars, r=<try>
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 #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 333c32a + b82f6c5 commit aa7e872

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
@@ -569,7 +569,7 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
569569
file_metadata,
570570
loc.line as c_uint,
571571
type_metadata,
572-
self.sess().opts.optimize != config::OptLevel::No,
572+
true,
573573
DIFlags::FlagZero,
574574
argument_index,
575575
align.bytes() as u32,

0 commit comments

Comments
 (0)