Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / unreachable-ret.c
blob25caded57556ad214491729baf2fe113f8d73124
1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
3 extern void abort(void) __attribute__((noreturn));
5 void f1(void) {
6 abort();
8 // CHECK-LABEL: define {{.*}}void @f1()
9 // CHECK-NEXT: entry:
10 // CHECK-NEXT: call void @abort()
11 // CHECK-NEXT: unreachable
12 // CHECK-NEXT: }
14 void *f2(void) {
15 abort();
16 return 0;
18 // CHECK-LABEL: define {{.*}}ptr @f2()
19 // CHECK-NEXT: entry:
20 // CHECK-NEXT: call void @abort()
21 // CHECK-NEXT: unreachable
22 // CHECK-NEXT: }