Rollup merge of #35141 - eddyb:assert-mir-debug, r=nagisa
rustc_trans: apply the debug location for the MIR Assert panic call. Helps `libcore` build with MIR trans and debuginfo; libcore has the body of `panic`, which resulted in: ``` inlinable function call in a function with debug info must have a !dbg location call void @_ZN4core9panicking5panic17h585bd70cda921012E({ %str_slice, %str_slice, i32 }* @panic_loc12745) LLVM ERROR: Broken function found, compilation aborted! ```
This commit is contained in:
commit
dc63b3a04a
@ -284,6 +284,7 @@ pub fn trans_block(&mut self, bb: mir::BasicBlock) {
|
||||
|
||||
// After this point, bcx is the block for the call to panic.
|
||||
bcx = panic_block.build();
|
||||
debug_loc.apply_to_bcx(&bcx);
|
||||
|
||||
// Get the location information.
|
||||
let loc = bcx.sess().codemap().lookup_char_pos(span.lo);
|
||||
|
Loading…
Reference in New Issue
Block a user