llvm-project/clang/test/CodeGen/unreachable-ret.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
454 B
C
Raw Normal View History

// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
extern void abort() __attribute__((noreturn));
void f1() {
abort();
}
// CHECK-LABEL: define {{.*}}void @f1()
// CHECK-NEXT: entry:
// CHECK-NEXT: call void @abort()
// CHECK-NEXT: unreachable
// CHECK-NEXT: }
void *f2() {
abort();
return 0;
}
// CHECK-LABEL: define {{.*}}i8* @f2()
// CHECK-NEXT: entry:
// CHECK-NEXT: call void @abort()
// CHECK-NEXT: unreachable
// CHECK-NEXT: }