Home | History | Annotate | Download | only in CodeGen
      1 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
      2 // REQUIRES: asserts
      3 
      4 // CHECK: @a.a = internal global i8* blockaddress(@a, %A)
      5 int a() {
      6 A:;static void* a = &&A;
      7 }
      8 
      9 // PR14005
     10 // CHECK: @b.ar = internal global {{.*}} sub (i{{..}} ptrtoint (i8* blockaddress(@b, %l2) to i{{..}}), i{{..}} ptrtoint (i8* blockaddress(@b, %l1) to i{{..}}))
     11 int b() {
     12   static int ar = &&l2 - &&l1;
     13 l1:
     14   return 10;
     15 l2:
     16   return 11;
     17 }
     18