2018-04-28 13:35:26 -05:00
|
|
|
//@ compile-flags: -g -C no-prepopulate-passes
|
2018-01-20 14:32:33 -06:00
|
|
|
|
2018-04-28 13:35:26 -05:00
|
|
|
#![crate_type = "lib"]
|
2018-01-20 14:32:33 -06:00
|
|
|
|
2018-04-28 13:35:26 -05:00
|
|
|
#[no_mangle]
|
|
|
|
pub fn foo() -> ! {
|
|
|
|
// CHECK: @foo() unnamed_addr #0
|
2018-01-20 14:32:33 -06:00
|
|
|
loop {}
|
|
|
|
}
|
|
|
|
|
2018-04-28 13:35:26 -05:00
|
|
|
pub enum EmptyEnum {}
|
|
|
|
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn bar() -> EmptyEnum {
|
|
|
|
// CHECK: @bar() unnamed_addr #0
|
|
|
|
loop {}
|
2018-01-20 14:32:33 -06:00
|
|
|
}
|
2018-04-28 13:35:26 -05:00
|
|
|
|
|
|
|
// CHECK: attributes #0 = {{{.*}} noreturn {{.*}}}
|
|
|
|
|
|
|
|
// CHECK: DISubprogram(name: "foo", {{.*}} DIFlagNoReturn
|
|
|
|
// CHECK: DISubprogram(name: "bar", {{.*}} DIFlagNoReturn
|