mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 12:46:06 +00:00

Conversion performed using the script at: https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34 These are only tests where no manual fixup was required.
18 lines
427 B
C
18 lines
427 B
C
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
|
// REQUIRES: asserts
|
|
|
|
// CHECK: @a.a = internal global ptr blockaddress(@a, %A)
|
|
int a(void) {
|
|
A:;static void* a = &&A;
|
|
}
|
|
|
|
// PR14005
|
|
// CHECK: @b.ar = internal global {{.*}} sub (i{{..}} ptrtoint (ptr blockaddress(@b, %l2) to i{{..}}), i{{..}} ptrtoint (ptr blockaddress(@b, %l1) to i{{..}}))
|
|
int b(void) {
|
|
static int ar = &&l2 - &&l1;
|
|
l1:
|
|
return 10;
|
|
l2:
|
|
return 11;
|
|
}
|