Codegen const panic messages as function calls
This skips emitting extra arguments at every callsite (of which there can be many). For a librustc_driver build with overflow checks enabled, this cuts 0.7MB from the resulting binary.
This commit is contained in:
parent
0ad927c0c0
commit
00f4daa276
12 changed files with 255 additions and 63 deletions
|
@ -4,7 +4,7 @@
|
|||
//@[NOASSERT] compile-flags: -Coverflow-checks=off
|
||||
|
||||
// CHECK-LABEL: define{{.*}} @assertion
|
||||
// ASSERT: call void @{{.*4core9panicking5panic}}
|
||||
// ASSERT: call void @{{.*4core9panicking11panic_const24panic_const_add_overflow}}
|
||||
// NOASSERT: ret i8 0
|
||||
#[no_mangle]
|
||||
pub fn assertion() -> u8 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue