Ensure [rust] debuginfo-level-std
doesn't change core's MIR
This commit is contained in:
parent
6094063c35
commit
90b4c86335
9 changed files with 38 additions and 157 deletions
|
@ -699,7 +699,17 @@ impl<'tcx> Inliner<'tcx> {
|
|||
// Insert all of the (mapped) parts of the callee body into the caller.
|
||||
caller_body.local_decls.extend(callee_body.drain_vars_and_temps());
|
||||
caller_body.source_scopes.extend(&mut callee_body.source_scopes.drain(..));
|
||||
if self.tcx.sess.opts.debuginfo != DebugInfo::None {
|
||||
if self
|
||||
.tcx
|
||||
.sess
|
||||
.opts
|
||||
.unstable_opts
|
||||
.inline_mir_preserve_debug
|
||||
.unwrap_or(self.tcx.sess.opts.debuginfo != DebugInfo::None)
|
||||
{
|
||||
// Note that we need to preserve these in the standard library so that
|
||||
// people working on rust can build with or without debuginfo while
|
||||
// still getting consistent results from the mir-opt tests.
|
||||
caller_body.var_debug_info.append(&mut callee_body.var_debug_info);
|
||||
}
|
||||
caller_body.basic_blocks_mut().extend(callee_body.basic_blocks_mut().drain(..));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue