about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSeo Sanghyeon <sanxiyn@gmail.com>2016-08-02 00:12:40 +0900
committerGitHub <noreply@github.com>2016-08-02 00:12:40 +0900
commitdc63b3a04add20ae5d175fd6a7d6fac00aef8dd9 (patch)
treec834fe0c86032a4136872b4bb9426f4726ab987f /src
parenta790fbce23e823cde291d2c7452efdb7609303bb (diff)
parentd1f341dd91f7660bd64acfbd63f4513f9a327217 (diff)
downloadrust-dc63b3a04add20ae5d175fd6a7d6fac00aef8dd9.tar.gz
rust-dc63b3a04add20ae5d175fd6a7d6fac00aef8dd9.zip
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!
```
Diffstat (limited to 'src')
-rw-r--r--src/librustc_trans/mir/block.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_trans/mir/block.rs b/src/librustc_trans/mir/block.rs
index 7a7f1901736..2d1769b8637 100644
--- a/src/librustc_trans/mir/block.rs
+++ b/src/librustc_trans/mir/block.rs
@@ -284,6 +284,7 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
 
                 // 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);