2019-04-11 01:03:09 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
|
|
|
|
|
|
|
|
extern void abort() __attribute__((noreturn));
|
|
|
|
|
|
|
|
void f1() {
|
|
|
|
abort();
|
|
|
|
}
|
2019-04-11 03:11:32 +08:00
|
|
|
// CHECK-LABEL: define {{.*}}void @f1()
|
2019-04-11 01:03:09 +08:00
|
|
|
// CHECK-NEXT: entry:
|
|
|
|
// CHECK-NEXT: call void @abort()
|
|
|
|
// CHECK-NEXT: unreachable
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
|
|
|
|
void *f2() {
|
|
|
|
abort();
|
|
|
|
return 0;
|
|
|
|
}
|
2019-04-11 03:11:32 +08:00
|
|
|
// CHECK-LABEL: define {{.*}}i8* @f2()
|
2019-04-11 01:03:09 +08:00
|
|
|
// CHECK-NEXT: entry:
|
|
|
|
// CHECK-NEXT: call void @abort()
|
|
|
|
// CHECK-NEXT: unreachable
|
|
|
|
// CHECK-NEXT: }
|
|
|
|
|