Uh oh!
There was an error while loading. Please reload this page.
rustc_trans: apply the debug location for the MIR Assert panic call. - #35141
Conversation
rust-highfive
commented
Jul 31, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
| // After this point, bcx is the block for the call to panic. | ||
| bcx = panic_block.build(); | ||
| debug_loc.apply_to_bcx(&bcx); |
There was a problem hiding this comment.
I feel like this is a fairly easy stuff to overlook. I skimmed the context and haven’t found any more obvious instances of such mistake, but I feel like it is considerably easy to make similar mistake at any point in the future.
Perhaps we should consider making a wrapper of some sort for fcx.new_block?
There was a problem hiding this comment.
When old trans is gone, we can have a simpler and less error-prone interface, i.e. a Block that always knows its debug position.
nagisa
commented
Jul 31, 2016
r=me, but I have a feeling that I will see a similar PR at some time in the future again. |
eddyb
commented
Jul 31, 2016
@bors r=nagisa rollup |
bors
commented
Jul 31, 2016
📌 Commit d1f341d has been approved by |
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!
```
Helps
libcorebuild with MIR trans and debuginfo; libcore has the body ofpanic, which resulted in: