Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
      2 // CHECK-NOT: @unreachable
      3 
      4 extern void abort() __attribute__((noreturn));
      5 extern int unreachable();
      6 
      7 int f0() {
      8   return 0;
      9   unreachable();
     10 }
     11 
     12 int f1(int i) {
     13   goto L0;
     14   int a = unreachable();
     15  L0:
     16   return 0;
     17 }
     18 
     19 int f2(int i) {
     20   goto L0;
     21   unreachable();
     22   int a;
     23   unreachable();
     24  L0:
     25   a = i + 1;
     26   return a;
     27 }
     28 
     29 int f3(int i) {
     30   if (i) {
     31     return 0;
     32   } else {
     33     abort();
     34   }
     35   unreachable();
     36   return 3;
     37 }
     38