// This is PR244
-// CHECK: define void @bar(
+// CHECK-LABEL: define void @bar(
// CHECK: call {{.*}} @func
// CHECK: define internal {{.*}}i32 @func(
static int func();
int* foo(int** a, int* b, int* c) {
return __sync_val_compare_and_swap (a, b, c);
}
-// CHECK: define i32* @foo
+// CHECK-LABEL: define i32* @foo
// CHECK: cmpxchg
int foo2(int** a, int* b, int* c) {
return __sync_bool_compare_and_swap (a, b, c);
}
-// CHECK: define i32 @foo2
+// CHECK-LABEL: define i32 @foo2
// CHECK: cmpxchg
int* foo3(int** a, int b) {
return __sync_fetch_and_add (a, b);
}
-// CHECK: define i32* @foo3
+// CHECK-LABEL: define i32* @foo3
// CHECK: atomicrmw add
int* foo4(int** a, int b) {
return __sync_fetch_and_sub (a, b);
}
-// CHECK: define i32* @foo4
+// CHECK-LABEL: define i32* @foo4
// CHECK: atomicrmw sub
int* foo5(int** a, int* b) {
return __sync_lock_test_and_set (a, b);
}
-// CHECK: define i32* @foo5
+// CHECK-LABEL: define i32* @foo5
// CHECK: atomicrmw xchg
int* foo6(int** a, int*** b) {
return __sync_lock_test_and_set (a, b);
}
-// CHECK: define i32* @foo6
+// CHECK-LABEL: define i32* @foo6
// CHECK: atomicrmw xchg
// RUN: %clang_cc1 -triple i386-unknown-unknown -O1 -emit-llvm -o - %s | FileCheck %s
-// CHECK: define i32 @f0()
+// CHECK-LABEL: define i32 @f0()
// CHECK: ret i32 0
-// CHECK: define i32 @f1()
+// CHECK-LABEL: define i32 @f1()
// CHECK: ret i32 0
-// CHECK: define i32 @f2()
+// CHECK-LABEL: define i32 @f2()
// CHECK: ret i32 0
// <rdar://problem/6113085>
// RUN: %clang_cc1 -triple i386-unknown-unknown -O1 -emit-llvm -o - %s | FileCheck %s
-// CHECK: define i32 @f0
+// CHECK-LABEL: define i32 @f0
// CHECK: ret i32 1
-// CHECK: define i32 @f1
+// CHECK-LABEL: define i32 @f1
// CHECK: ret i32 1
-// CHECK: define i32 @f2
+// CHECK-LABEL: define i32 @f2
// CHECK: ret i32 1
// <rdr://6115726>
#include <x86intrin.h>
__m64 test_m_pavgusb(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pavgusb
+ // CHECK-LABEL: define i64 @test_m_pavgusb
// CHECK: @llvm.x86.3dnow.pavgusb
return _m_pavgusb(m1, m2);
}
__m64 test_m_pf2id(__m64 m) {
- // CHECK: define i64 @test_m_pf2id
+ // CHECK-LABEL: define i64 @test_m_pf2id
// CHECK: @llvm.x86.3dnow.pf2id
return _m_pf2id(m);
}
__m64 test_m_pfacc(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfacc
+ // CHECK-LABEL: define i64 @test_m_pfacc
// CHECK: @llvm.x86.3dnow.pfacc
return _m_pfacc(m1, m2);
}
__m64 test_m_pfadd(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfadd
+ // CHECK-LABEL: define i64 @test_m_pfadd
// CHECK: @llvm.x86.3dnow.pfadd
return _m_pfadd(m1, m2);
}
__m64 test_m_pfcmpeq(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfcmpeq
+ // CHECK-LABEL: define i64 @test_m_pfcmpeq
// CHECK: @llvm.x86.3dnow.pfcmpeq
return _m_pfcmpeq(m1, m2);
}
__m64 test_m_pfcmpge(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfcmpge
+ // CHECK-LABEL: define i64 @test_m_pfcmpge
// CHECK: @llvm.x86.3dnow.pfcmpge
return _m_pfcmpge(m1, m2);
}
__m64 test_m_pfcmpgt(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfcmpgt
+ // CHECK-LABEL: define i64 @test_m_pfcmpgt
// CHECK: @llvm.x86.3dnow.pfcmpgt
return _m_pfcmpgt(m1, m2);
}
__m64 test_m_pfmax(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfmax
+ // CHECK-LABEL: define i64 @test_m_pfmax
// CHECK: @llvm.x86.3dnow.pfmax
return _m_pfmax(m1, m2);
}
__m64 test_m_pfmin(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfmin
+ // CHECK-LABEL: define i64 @test_m_pfmin
// CHECK: @llvm.x86.3dnow.pfmin
return _m_pfmin(m1, m2);
}
__m64 test_m_pfmul(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfmul
+ // CHECK-LABEL: define i64 @test_m_pfmul
// CHECK: @llvm.x86.3dnow.pfmul
return _m_pfmul(m1, m2);
}
__m64 test_m_pfrcp(__m64 m) {
- // CHECK: define i64 @test_m_pfrcp
+ // CHECK-LABEL: define i64 @test_m_pfrcp
// CHECK: @llvm.x86.3dnow.pfrcp
return _m_pfrcp(m);
}
__m64 test_m_pfrcpit1(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfrcpit1
+ // CHECK-LABEL: define i64 @test_m_pfrcpit1
// CHECK: @llvm.x86.3dnow.pfrcpit1
return _m_pfrcpit1(m1, m2);
}
__m64 test_m_pfrcpit2(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfrcpit2
+ // CHECK-LABEL: define i64 @test_m_pfrcpit2
// CHECK: @llvm.x86.3dnow.pfrcpit2
return _m_pfrcpit2(m1, m2);
}
__m64 test_m_pfrsqrt(__m64 m) {
- // CHECK: define i64 @test_m_pfrsqrt
+ // CHECK-LABEL: define i64 @test_m_pfrsqrt
// CHECK: @llvm.x86.3dnow.pfrsqrt
return _m_pfrsqrt(m);
}
__m64 test_m_pfrsqrtit1(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfrsqrtit1
+ // CHECK-LABEL: define i64 @test_m_pfrsqrtit1
// CHECK: @llvm.x86.3dnow.pfrsqit1
return _m_pfrsqrtit1(m1, m2);
}
__m64 test_m_pfsub(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfsub
+ // CHECK-LABEL: define i64 @test_m_pfsub
// CHECK: @llvm.x86.3dnow.pfsub
return _m_pfsub(m1, m2);
}
__m64 test_m_pfsubr(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfsubr
+ // CHECK-LABEL: define i64 @test_m_pfsubr
// CHECK: @llvm.x86.3dnow.pfsubr
return _m_pfsubr(m1, m2);
}
__m64 test_m_pi2fd(__m64 m) {
- // CHECK: define i64 @test_m_pi2fd
+ // CHECK-LABEL: define i64 @test_m_pi2fd
// CHECK: @llvm.x86.3dnow.pi2fd
return _m_pi2fd(m);
}
__m64 test_m_pmulhrw(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pmulhrw
+ // CHECK-LABEL: define i64 @test_m_pmulhrw
// CHECK: @llvm.x86.3dnow.pmulhrw
return _m_pmulhrw(m1, m2);
}
__m64 test_m_pf2iw(__m64 m) {
- // CHECK: define i64 @test_m_pf2iw
+ // CHECK-LABEL: define i64 @test_m_pf2iw
// CHECK: @llvm.x86.3dnowa.pf2iw
return _m_pf2iw(m);
}
__m64 test_m_pfnacc(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfnacc
+ // CHECK-LABEL: define i64 @test_m_pfnacc
// CHECK: @llvm.x86.3dnowa.pfnacc
return _m_pfnacc(m1, m2);
}
__m64 test_m_pfpnacc(__m64 m1, __m64 m2) {
- // CHECK: define i64 @test_m_pfpnacc
+ // CHECK-LABEL: define i64 @test_m_pfpnacc
// CHECK: @llvm.x86.3dnowa.pfpnacc
return _m_pfpnacc(m1, m2);
}
__m64 test_m_pi2fw(__m64 m) {
- // CHECK: define i64 @test_m_pi2fw
+ // CHECK-LABEL: define i64 @test_m_pi2fw
// CHECK: @llvm.x86.3dnowa.pi2fw
return _m_pi2fw(m);
}
__m64 test_m_pswapdsf(__m64 m) {
- // CHECK: define i64 @test_m_pswapdsf
+ // CHECK-LABEL: define i64 @test_m_pswapdsf
// CHECK: @llvm.x86.3dnowa.pswapd
return _m_pswapdsf(m);
}
__m64 test_m_pswapdsi(__m64 m) {
- // CHECK: define i64 @test_m_pswapdsi
+ // CHECK-LABEL: define i64 @test_m_pswapdsi
// CHECK: @llvm.x86.3dnowa.pswapd
return _m_pswapdsi(m);
}
signed long long sll;
unsigned long long ull;
-void test_op_ignore (void) // CHECK: define void @test_op_ignore
+void test_op_ignore (void) // CHECK-LABEL: define void @test_op_ignore
{
(void) __sync_fetch_and_add (&sc, 1); // CHECK: atomicrmw add i8
(void) __sync_fetch_and_add (&uc, 1); // CHECK: atomicrmw add i8
}
-void test_fetch_and_op (void) // CHECK: define void @test_fetch_and_op
+void test_fetch_and_op (void) // CHECK-LABEL: define void @test_fetch_and_op
{
sc = __sync_fetch_and_add (&sc, 11); // CHECK: atomicrmw add
uc = __sync_fetch_and_add (&uc, 11); // CHECK: atomicrmw add
// RUN: %clang_cc1 -triple i386 -emit-llvm -O2 -o - %s | FileCheck %s
-// CHECK: define i32 @f0()
+// CHECK-LABEL: define i32 @f0()
// CHECK: ret i32 1
// CHECK: }
// Sign extension is performed by the callee on AArch64, which means
// that we *shouldn't* tag arguments and returns with their extension.
-// PCS: define i8 @f0(i16 %a)
+// PCS-LABEL: define i8 @f0(i16 %a)
char f0(short a) {
return a;
}
struct s6 { int f0[1]; };
struct s6 f6(void) {}
-// PCS: define void @f7()
+// PCS-LABEL: define void @f7()
struct s7 { struct { int : 0; } f0; };
struct s7 f7(void) {}
-// PCS: define void @f8()
+// PCS-LABEL: define void @f8()
struct s8 { struct { int : 0; } f0[1]; };
struct s8 f8(void) {}
union u12 { char f0; short f1; int f2; long f3; };
union u12 f12(void) {}
-// PCS: define %struct.s13 @f13()
+// PCS-LABEL: define %struct.s13 @f13()
struct s13 { float f0; };
struct s13 f13(void) {}
-// PCS: define %union.u14 @f14()
+// PCS-LABEL: define %union.u14 @f14()
union u14 { float f0; };
union u14 f14(void) {}
-// PCS: define void @f15()
+// PCS-LABEL: define void @f15()
void f15(struct s7 a0) {}
-// PCS: define void @f16()
+// PCS-LABEL: define void @f16()
void f16(struct s8 a0) {}
// PCS: define [1 x i64] @f17()
struct s27 { _Complex long f0; };
struct s27 f27() {}
-// PCS: define void @f28(i8 %a, i16 %b, i32 %c, i64 %d, float %e, double %f)
+// PCS-LABEL: define void @f28(i8 %a, i16 %b, i32 %c, i64 %d, float %e, double %f)
void f28(char a, short b, int c, long d, float e, double f) {}
// PCS: define void @f29([2 x i64] %a
struct s29 { int arr[4]; };
void f29(struct s29 a) {}
-// PCS: define void @f30(%struct.s30* %a)
+// PCS-LABEL: define void @f30(%struct.s30* %a)
struct s30 { int arr[4]; char c;};
void f30(struct s30 a) {}
struct s31 { double arr[4]; };
void f31(struct s31 a) {}
-// PCS: define void @f32(%struct.s32* %a)
+// PCS-LABEL: define void @f32(%struct.s32* %a)
struct s32 { float arr[5]; };
void f32(struct s32 a) {}
struct s33 { float arr[3]; float a; };
void f33(struct s33 a) {}
-// PCS: define void @f34(%struct.s34* noalias sret
+// PCS-LABEL: define void @f34(%struct.s34* noalias sret
struct s34 { int a[4]; char b };
struct s34 f34(void) {}
-// PCS: define void @f35()
+// PCS-LABEL: define void @f35()
struct s35 {};
void f35(struct s35 a) {}
va_list the_list;
int simple_int(void) {
-// CHECK: define i32 @simple_int
+// CHECK-LABEL: define i32 @simple_int
return va_arg(the_list, int);
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0
}
__int128 aligned_int(void) {
-// CHECK: define i128 @aligned_int
+// CHECK-LABEL: define i128 @aligned_int
return va_arg(the_list, __int128);
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0
};
struct bigstruct simple_indirect(void) {
-// CHECK: define void @simple_indirect
+// CHECK-LABEL: define void @simple_indirect
return va_arg(the_list, struct bigstruct);
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0
};
struct aligned_bigstruct simple_aligned_indirect(void) {
-// CHECK: define void @simple_aligned_indirect
+// CHECK-LABEL: define void @simple_aligned_indirect
return va_arg(the_list, struct aligned_bigstruct);
// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 3)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[GR_OFFS]], 0
}
double simple_double(void) {
-// CHECK: define double @simple_double
+// CHECK-LABEL: define double @simple_double
return va_arg(the_list, double);
// CHECK: [[VR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 4)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[VR_OFFS]], 0
};
struct hfa simple_hfa(void) {
-// CHECK: define %struct.hfa @simple_hfa
+// CHECK-LABEL: define %struct.hfa @simple_hfa
return va_arg(the_list, struct hfa);
// CHECK: [[VR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 4)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[VR_OFFS]], 0
}
void check_start(int n, ...) {
-// CHECK: define void @check_start(i32 %n, ...)
+// CHECK-LABEL: define void @check_start(i32 %n, ...)
va_list the_list;
va_start(the_list, n);
// CHECK: @ban = common addrspace(1) global
int ban[10] __attribute__((address_space(1)));
-// CHECK: define i32 @test1()
+// CHECK-LABEL: define i32 @test1()
// CHECK: load i32 addrspace(1)* @foo
int test1() { return foo; }
-// CHECK: define i32 @test2(i32 %i)
+// CHECK-LABEL: define i32 @test2(i32 %i)
// CHECK: load i32 addrspace(1)*
// CHECK-NEXT: ret i32
int test2(int i) { return ban[i]; }
// Both A and B point into addrspace(2).
__attribute__((address_space(2))) int *A, *B;
-// CHECK: define void @test3()
+// CHECK-LABEL: define void @test3()
// CHECK: load i32 addrspace(2)** @B
// CHECK: load i32 addrspace(2)*
// CHECK: load i32 addrspace(2)** @A
float aData[1];
} MyStruct;
-// CHECK: define void @test4(
+// CHECK-LABEL: define void @test4(
// CHECK: call void @llvm.memcpy.p0i8.p2i8
// CHECK: call void @llvm.memcpy.p2i8.p0i8
void test4(MyStruct __attribute__((address_space(2))) *pPtr) {
// Make sure that aliases cause referenced values to be emitted.
// PR3200
static inline int foo1() { return 0; }
-// CHECKBASIC: define internal i32 @foo1()
+// CHECKBASIC-LABEL: define internal i32 @foo1()
int foo() __attribute__((alias("foo1")));
int bar() __attribute__((alias("bar1")));
int test (long long x) {
return (int)x;
}
-// CHECK: define i32 @test
+// CHECK-LABEL: define i32 @test
// CHECK: alloca i64, align 8
int test2(struct X x __attribute((aligned(16)))) {
return x.z;
}
-// CHECK: define i32 @test2
+// CHECK-LABEL: define i32 @test2
// CHECK: alloca %struct.X, align 16
void local(void) {
int localvar __attribute__((annotate("localvar_ann_0"))) __attribute__((annotate("localvar_ann_1"))) = 3;
-// LOCAL: define void @local()
+// LOCAL-LABEL: define void @local()
// LOCAL: [[LOCALVAR:%.*]] = alloca i32,
// LOCAL-NEXT: [[T0:%.*]] = bitcast i32* [[LOCALVAR]] to i8*
// LOCAL-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 33)
void undef(void) {
int undefvar __attribute__((annotate("undefvar_ann_0")));
-// UNDEF: define void @undef()
+// UNDEF-LABEL: define void @undef()
// UNDEF: [[UNDEFVAR:%.*]] = alloca i32,
// UNDEF-NEXT: [[T0:%.*]] = bitcast i32* [[UNDEFVAR]] to i8*
// UNDEF-NEXT: call void @llvm.var.annotation(i8* [[T0]], i8* getelementptr inbounds ([15 x i8]* @{{.*}}), i8* getelementptr inbounds ({{.*}}), i32 43)
neon_callee(arg);
}
-// CHECK: define arm_aapcs_vfpcc void @f33(%struct.s33* byval %s)
+// CHECK-LABEL: define arm_aapcs_vfpcc void @f33(%struct.s33* byval %s)
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=APCS-GNU %s
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=AAPCS %s
-// APCS-GNU: define signext i8 @f0()
-// AAPCS: define arm_aapcscc signext i8 @f0()
+// APCS-GNU-LABEL: define signext i8 @f0()
+// AAPCS-LABEL: define arm_aapcscc signext i8 @f0()
char f0(void) {
return 0;
}
-// APCS-GNU: define i8 @f1()
-// AAPCS: define arm_aapcscc i8 @f1()
+// APCS-GNU-LABEL: define i8 @f1()
+// AAPCS-LABEL: define arm_aapcscc i8 @f1()
struct s1 { char f0; };
struct s1 f1(void) {}
-// APCS-GNU: define i16 @f2()
-// AAPCS: define arm_aapcscc i16 @f2()
+// APCS-GNU-LABEL: define i16 @f2()
+// AAPCS-LABEL: define arm_aapcscc i16 @f2()
struct s2 { short f0; };
struct s2 f2(void) {}
-// APCS-GNU: define i32 @f3()
-// AAPCS: define arm_aapcscc i32 @f3()
+// APCS-GNU-LABEL: define i32 @f3()
+// AAPCS-LABEL: define arm_aapcscc i32 @f3()
struct s3 { int f0; };
struct s3 f3(void) {}
-// APCS-GNU: define i32 @f4()
-// AAPCS: define arm_aapcscc i32 @f4()
+// APCS-GNU-LABEL: define i32 @f4()
+// AAPCS-LABEL: define arm_aapcscc i32 @f4()
struct s4 { struct s4_0 { int f0; } f0; };
struct s4 f4(void) {}
-// APCS-GNU: define void @f5(
+// APCS-GNU-LABEL: define void @f5(
// APCS-GNU: struct.s5* noalias sret
-// AAPCS: define arm_aapcscc i32 @f5()
+// AAPCS-LABEL: define arm_aapcscc i32 @f5()
struct s5 { struct { } f0; int f1; };
struct s5 f5(void) {}
-// APCS-GNU: define void @f6(
+// APCS-GNU-LABEL: define void @f6(
// APCS-GNU: struct.s6* noalias sret
-// AAPCS: define arm_aapcscc i32 @f6()
+// AAPCS-LABEL: define arm_aapcscc i32 @f6()
struct s6 { int f0[1]; };
struct s6 f6(void) {}
-// APCS-GNU: define void @f7()
-// AAPCS: define arm_aapcscc void @f7()
+// APCS-GNU-LABEL: define void @f7()
+// AAPCS-LABEL: define arm_aapcscc void @f7()
struct s7 { struct { int : 0; } f0; };
struct s7 f7(void) {}
-// APCS-GNU: define void @f8(
+// APCS-GNU-LABEL: define void @f8(
// APCS-GNU: struct.s8* noalias sret
-// AAPCS: define arm_aapcscc void @f8()
+// AAPCS-LABEL: define arm_aapcscc void @f8()
struct s8 { struct { int : 0; } f0[1]; };
struct s8 f8(void) {}
-// APCS-GNU: define i32 @f9()
-// AAPCS: define arm_aapcscc i32 @f9()
+// APCS-GNU-LABEL: define i32 @f9()
+// AAPCS-LABEL: define arm_aapcscc i32 @f9()
struct s9 { int f0; int : 0; };
struct s9 f9(void) {}
-// APCS-GNU: define i32 @f10()
-// AAPCS: define arm_aapcscc i32 @f10()
+// APCS-GNU-LABEL: define i32 @f10()
+// AAPCS-LABEL: define arm_aapcscc i32 @f10()
struct s10 { int f0; int : 0; int : 0; };
struct s10 f10(void) {}
-// APCS-GNU: define void @f11(
+// APCS-GNU-LABEL: define void @f11(
// APCS-GNU: struct.s11* noalias sret
-// AAPCS: define arm_aapcscc i32 @f11()
+// AAPCS-LABEL: define arm_aapcscc i32 @f11()
struct s11 { int : 0; int f0; };
struct s11 f11(void) {}
-// APCS-GNU: define i32 @f12()
-// AAPCS: define arm_aapcscc i32 @f12()
+// APCS-GNU-LABEL: define i32 @f12()
+// AAPCS-LABEL: define arm_aapcscc i32 @f12()
union u12 { char f0; short f1; int f2; };
union u12 f12(void) {}
-// APCS-GNU: define void @f13(
+// APCS-GNU-LABEL: define void @f13(
// APCS-GNU: struct.s13* noalias sret
// FIXME: This should return a float.
struct s13 { float f0; };
struct s13 f13(void) {}
-// APCS-GNU: define void @f14(
+// APCS-GNU-LABEL: define void @f14(
// APCS-GNU: union.u14* noalias sret
-// AAPCS: define arm_aapcscc i32 @f14()
+// AAPCS-LABEL: define arm_aapcscc i32 @f14()
union u14 { float f0; };
union u14 f14(void) {}
-// APCS-GNU: define void @f15()
-// AAPCS: define arm_aapcscc void @f15()
+// APCS-GNU-LABEL: define void @f15()
+// AAPCS-LABEL: define arm_aapcscc void @f15()
void f15(struct s7 a0) {}
-// APCS-GNU: define void @f16()
-// AAPCS: define arm_aapcscc void @f16()
+// APCS-GNU-LABEL: define void @f16()
+// AAPCS-LABEL: define arm_aapcscc void @f16()
void f16(struct s8 a0) {}
-// APCS-GNU: define i32 @f17()
-// AAPCS: define arm_aapcscc i32 @f17()
+// APCS-GNU-LABEL: define i32 @f17()
+// AAPCS-LABEL: define arm_aapcscc i32 @f17()
struct s17 { short f0 : 13; char f1 : 4; };
struct s17 f17(void) {}
-// APCS-GNU: define i32 @f18()
-// AAPCS: define arm_aapcscc i32 @f18()
+// APCS-GNU-LABEL: define i32 @f18()
+// AAPCS-LABEL: define arm_aapcscc i32 @f18()
struct s18 { short f0; char f1 : 4; };
struct s18 f18(void) {}
-// APCS-GNU: define void @f19(
+// APCS-GNU-LABEL: define void @f19(
// APCS-GNU: struct.s19* noalias sret
-// AAPCS: define arm_aapcscc i32 @f19()
+// AAPCS-LABEL: define arm_aapcscc i32 @f19()
struct s19 { int f0; struct s8 f1; };
struct s19 f19(void) {}
-// APCS-GNU: define void @f20(
+// APCS-GNU-LABEL: define void @f20(
// APCS-GNU: struct.s20* noalias sret
-// AAPCS: define arm_aapcscc i32 @f20()
+// AAPCS-LABEL: define arm_aapcscc i32 @f20()
struct s20 { struct s8 f1; int f0; };
struct s20 f20(void) {}
-// APCS-GNU: define i8 @f21()
-// AAPCS: define arm_aapcscc i32 @f21()
+// APCS-GNU-LABEL: define i8 @f21()
+// AAPCS-LABEL: define arm_aapcscc i32 @f21()
struct s21 { struct {} f1; int f0 : 4; };
struct s21 f21(void) {}
-// APCS-GNU: define i16 @f22()
-// APCS-GNU: define i32 @f23()
-// APCS-GNU: define i64 @f24()
-// APCS-GNU: define i128 @f25()
-// APCS-GNU: define i64 @f26()
-// APCS-GNU: define i128 @f27()
-// AAPCS: define arm_aapcscc i16 @f22()
-// AAPCS: define arm_aapcscc i32 @f23()
+// APCS-GNU-LABEL: define i16 @f22()
+// APCS-GNU-LABEL: define i32 @f23()
+// APCS-GNU-LABEL: define i64 @f24()
+// APCS-GNU-LABEL: define i128 @f25()
+// APCS-GNU-LABEL: define i64 @f26()
+// APCS-GNU-LABEL: define i128 @f27()
+// AAPCS-LABEL: define arm_aapcscc i16 @f22()
+// AAPCS-LABEL: define arm_aapcscc i32 @f23()
// AAPCS: define arm_aapcscc void @f24({{.*}} noalias sret
// AAPCS: define arm_aapcscc void @f25({{.*}} noalias sret
// AAPCS: define arm_aapcscc void @f26({{.*}} noalias sret
_Complex float f26(void) {}
_Complex double f27(void) {}
-// APCS-GNU: define i16 @f28()
-// AAPCS: define arm_aapcscc i16 @f28()
+// APCS-GNU-LABEL: define i16 @f28()
+// AAPCS-LABEL: define arm_aapcscc i16 @f28()
struct s28 { _Complex char f0; };
struct s28 f28() {}
-// APCS-GNU: define i32 @f29()
-// AAPCS: define arm_aapcscc i32 @f29()
+// APCS-GNU-LABEL: define i32 @f29()
+// AAPCS-LABEL: define arm_aapcscc i32 @f29()
struct s29 { _Complex short f0; };
struct s29 f29() {}
// PR13350
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }
-// APCS-GNU: define void @f33(%struct.s33* byval %s)
-// AAPCS: define arm_aapcscc void @f33(%struct.s33* byval %s)
+// APCS-GNU-LABEL: define void @f33(%struct.s33* byval %s)
+// AAPCS-LABEL: define arm_aapcscc void @f33(%struct.s33* byval %s)
// PR14048
struct s34 { char c; };
*(float32x4_t *)&s2);
return v;
}
-// APCS-GNU: define <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval)
+// APCS-GNU-LABEL: define <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval)
// APCS-GNU: %[[a:.*]] = alloca %struct.s35, align 16
// APCS-GNU: %[[b:.*]] = bitcast %struct.s35* %[[a]] to i8*
// APCS-GNU: %[[c:.*]] = bitcast %struct.s35* %0 to i8*
// APCS-GNU: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[b]], i8* %[[c]]
// APCS-GNU: %[[d:.*]] = bitcast %struct.s35* %[[a]] to <4 x float>*
// APCS-GNU: load <4 x float>* %[[d]], align 16
-// AAPCS: define arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval)
+// AAPCS-LABEL: define arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval)
// AAPCS: %[[a:.*]] = alloca %struct.s35, align 16
// AAPCS: %[[b:.*]] = bitcast %struct.s35* %[[a]] to i8*
// AAPCS: %[[c:.*]] = bitcast %struct.s35* %0 to i8*
// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=LINUX-AAPCS %s
-// DARWIN-APCS: define void @f()
+// DARWIN-APCS-LABEL: define void @f()
// DARWIN-APCS: call void @g
-// DARWIN-AAPCS: define arm_aapcscc void @f()
+// DARWIN-AAPCS-LABEL: define arm_aapcscc void @f()
// DARWIN-AAPCS: call arm_aapcscc void @g
-// LINUX-APCS: define arm_apcscc void @f()
+// LINUX-APCS-LABEL: define arm_apcscc void @f()
// LINUX-APCS: call arm_apcscc void @g
-// LINUX-AAPCS: define void @f()
+// LINUX-AAPCS-LABEL: define void @f()
// LINUX-AAPCS: call void @g
void g(void);
void f(void) {
aapcs_fn bar;
int foo(aapcs_vfp_fn baz) {
-// CHECK: define i32 @foo
+// CHECK-LABEL: define i32 @foo
// CHECK: call arm_aapcscc
// CHECK: call arm_aapcs_vfpcc
return bar() + baz();
int a;
int b;
} s1;
-// CHECK: define i32 @f48(%struct.s1* byval %s)
+// CHECK-LABEL: define i32 @f48(%struct.s1* byval %s)
int __attribute__((pnaclcall)) f48(s1 s) { return s.a; }
-// CHECK: define void @f49(%struct.s1* noalias sret %agg.result)
+// CHECK-LABEL: define void @f49(%struct.s1* noalias sret %agg.result)
s1 __attribute__((pnaclcall)) f49() { s1 s; s.a = s.b = 1; return s; }
union simple_union {
char b;
};
// Unions should be passed as byval structs
-// CHECK: define void @f50(%union.simple_union* byval %s)
+// CHECK-LABEL: define void @f50(%union.simple_union* byval %s)
void __attribute__((pnaclcall)) f50(union simple_union s) {}
typedef struct {
int b8 : 8;
} bitfield1;
// Bitfields should be passed as byval structs
-// CHECK: define void @f51(%struct.bitfield1* byval %bf1)
+// CHECK-LABEL: define void @f51(%struct.bitfield1* byval %bf1)
void __attribute__((pnaclcall)) f51(bitfield1 bf1) {}
// Check that we don't generate unnecessary reloads.
//
-// CHECK: define void @f0()
+// CHECK-LABEL: define void @f0()
// CHECK: [[x_0:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[y_0:%.*]] = alloca i32, align 4
// CHECK-NEXT: store i32 1, i32* [[x_0]]
// This used to test that we generate reloads for volatile access,
// but that does not appear to be correct behavior for C.
//
-// CHECK: define void @f1()
+// CHECK-LABEL: define void @f1()
// CHECK: [[x_1:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[y_1:%.*]] = alloca i32, align 4
// CHECK-NEXT: store volatile i32 1, i32* [[x_1]]
(void)__atomic_load(&a1, &a2, memory_order_seq_cst);
(void)__atomic_store(&a1, &a2, memory_order_seq_cst);
-// ARM: define arm_aapcscc void @test1
+// ARM-LABEL: define arm_aapcscc void @test1
// ARM: = call arm_aapcscc zeroext i8 @__atomic_load_1(i8* @c1
// ARM: call arm_aapcscc void @__atomic_store_1(i8* @c1, i8 zeroext
// ARM: = call arm_aapcscc zeroext i16 @__atomic_load_2(i8* bitcast (i16* @s1 to i8*)
// ARM: call arm_aapcscc void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
// ARM: call arm_aapcscc void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
-// PPC32: define void @test1
+// PPC32-LABEL: define void @test1
// PPC32: = load atomic i8* @c1 seq_cst
// PPC32: store atomic i8 {{.*}}, i8* @c1 seq_cst
// PPC32: = load atomic i16* @s1 seq_cst
// PPC32: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
// PPC32: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
-// PPC64: define void @test1
+// PPC64-LABEL: define void @test1
// PPC64: = load atomic i8* @c1 seq_cst
// PPC64: store atomic i8 {{.*}}, i8* @c1 seq_cst
// PPC64: = load atomic i16* @s1 seq_cst
// PPC64: call void @__atomic_load(i64 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
// PPC64: call void @__atomic_store(i64 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
-// MIPS32: define void @test1
+// MIPS32-LABEL: define void @test1
// MIPS32: = load atomic i8* @c1 seq_cst
// MIPS32: store atomic i8 {{.*}}, i8* @c1 seq_cst
// MIPS32: = load atomic i16* @s1 seq_cst
// MIPS32: call void @__atomic_load(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
// MIPS32: call void @__atomic_store(i32 100, i8* getelementptr inbounds ([100 x i8]* @a1, i32 0, i32 0), i8* getelementptr inbounds ([100 x i8]* @a2, i32 0, i32 0)
-// MIPS64: define void @test1
+// MIPS64-LABEL: define void @test1
// MIPS64: = load atomic i8* @c1 seq_cst
// MIPS64: store atomic i8 {{.*}}, i8* @c1 seq_cst
// MIPS64: = load atomic i16* @s1 seq_cst
// RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin9.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_5 %s
// RUN: %clang_cc1 -fvisibility hidden "-triple" "x86_64-apple-darwin10.0.0" -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-10_6 %s
-// CHECK-10_4: define hidden void @f2
-// CHECK-10_5: define hidden void @f2
-// CHECK-10_6: define hidden void @f2
+// CHECK-10_4-LABEL: define hidden void @f2
+// CHECK-10_5-LABEL: define hidden void @f2
+// CHECK-10_6-LABEL: define hidden void @f2
void f2();
void f2() { }
-// CHECK-10_4: define void @f3
-// CHECK-10_5: define void @f3
-// CHECK-10_6: define void @f3
+// CHECK-10_4-LABEL: define void @f3
+// CHECK-10_5-LABEL: define void @f3
+// CHECK-10_6-LABEL: define void @f3
void f3() __attribute__((availability(macosx,introduced=10.5)));
void f3() { }
test1_g();
}
-// CHECK: define void @test2_f()
+// CHECK-LABEL: define void @test2_f()
void test2_f(void) {}
static void test2_g(void) __attribute__((weakref("test2_f")));
void test2_h(void) {
test3_g();
}
-// CHECK: define void @test4_f()
+// CHECK-LABEL: define void @test4_f()
void test4_f(void);
static void test4_g(void) __attribute__((weakref("test4_f")));
void test4_h(void) {
inline void f0(int y) { x = y; }
-// CHECK: define void @test()
+// CHECK-LABEL: define void @test()
// CHECK: declare void @f0(i32)
void test() {
f0(17);
return (a0->f0 += 1);
}
-// CHECK-OPT: define i64 @test_0()
+// CHECK-OPT-LABEL: define i64 @test_0()
// CHECK-OPT: ret i64 1
// CHECK-OPT: }
unsigned long long test_0() {
return (a0->f1 += 1234);
}
-// CHECK-OPT: define i64 @test_1()
+// CHECK-OPT-LABEL: define i64 @test_1()
// CHECK-OPT: ret i64 210
// CHECK-OPT: }
unsigned long long test_1() {
return (a0->f0 += 1234);
}
-// CHECK-OPT: define i64 @test_2()
+// CHECK-OPT-LABEL: define i64 @test_2()
// CHECK-OPT: ret i64 2
// CHECK-OPT: }
unsigned long long test_2() {
return (a0->f0 += 1234);
}
-// CHECK-OPT: define i64 @test_3()
+// CHECK-OPT-LABEL: define i64 @test_3()
// CHECK-OPT: ret i64 -559039940
// CHECK-OPT: }
unsigned long long test_3() {
return (a0->f0 += 1234) ^ (a0->f1 += 5678);
}
-// CHECK-OPT: define i64 @test_4()
+// CHECK-OPT-LABEL: define i64 @test_4()
// CHECK-OPT: ret i64 4860
// CHECK-OPT: }
unsigned long long test_4() {
return (a0->f0 += 0xF) ^ (a0->f1 += 0xF) ^ (a0->f2 += 0xF);
}
-// CHECK-OPT: define i64 @test_5()
+// CHECK-OPT-LABEL: define i64 @test_5()
// CHECK-OPT: ret i64 2
// CHECK-OPT: }
unsigned long long test_5() {
return (a0->f0 += 0xF);
}
-// CHECK-OPT: define zeroext i1 @test_6()
+// CHECK-OPT-LABEL: define zeroext i1 @test_6()
// CHECK-OPT: ret i1 true
// CHECK-OPT: }
_Bool test_6() {
return (a0->f0 += 0xFD) ^ (a0->f2 += 0xFD) ^ (a0->f3 += 0xFD);
}
-// CHECK-OPT: define i32 @test_8()
+// CHECK-OPT-LABEL: define i32 @test_8()
// CHECK-OPT: ret i32 -3
// CHECK-OPT: }
unsigned test_8() {
a = makeAgg();
}
-// CHECK: define void @test0()
+// CHECK-LABEL: define void @test0()
// CHECK: [[A:%.*]] = alloca [[BYREF:%.*]], align 8
// CHECK-NEXT: [[TEMP:%.*]] = alloca [[AGG]], align 4
// CHECK: [[RESULT:%.*]] = call i32 @makeAgg()
__block Agg a, b;
a = b = makeAgg();
}
-// CHECK: define void @test1()
+// CHECK-LABEL: define void @test1()
// CHECK: [[A:%.*]] = alloca [[A_BYREF:%.*]], align 8
// CHECK-NEXT: [[B:%.*]] = alloca [[B_BYREF:%.*]], align 8
// CHECK-NEXT: [[TEMP:%.*]] = alloca [[AGG]], align 4
// The bool can fill in between the header and the long long.
// Add the appropriate amount of padding between them.
void f4_helper(long long (^)(void));
-// CHECK: define void @f4()
+// CHECK-LABEL: define void @f4()
void f4(void) {
_Bool b = 0;
long long ll = 0;
char buffer[32] __attribute((aligned));
};
void f5_helper(void (^)(struct F5 *));
-// CHECK: define void @f5()
+// CHECK-LABEL: define void @f5()
void f5(void) {
struct F5 value;
// CHECK: alloca <{ i8*, i32, i32, i8*, {{%.*}}*, [12 x i8], [[F5:%.*]] }>, align 16
*x = *y;
}
-// CHECK: define void @f(
+// CHECK-LABEL: define void @f(
// CHECK: [[FROMMEM:%.*]] = load i32* %
// CHECK: [[BOOLVAL:%.*]] = trunc i32 [[FROMMEM]] to i1
// CHECK: [[TOMEM:%.*]] = zext i1 [[BOOLVAL]] to i32
int res_ui;
int res_f;
-// CHECK: define void @test1
+// CHECK-LABEL: define void @test1
void test1() {
/* vec_abs */
}
-// CHECK: define void @test2
+// CHECK-LABEL: define void @test2
void test2() {
/* vec_avg */
res_vsc = vec_avg(vsc, vsc); // CHECK: @llvm.ppc.altivec.vavgsb
res_vbi = vec_vcmpgefp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
}
-// CHECK: define void @test5
+// CHECK-LABEL: define void @test5
void test5() {
/* vec_cmpgt */
res_vbi = vec_cmple(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
}
-// CHECK: define void @test6
+// CHECK-LABEL: define void @test6
void test6() {
/* vec_cmplt */
res_vbc = vec_cmplt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb
}
/* ------------------------------ Relational Operators ------------------------------ */
-// CHECK: define void @test7
+// CHECK-LABEL: define void @test7
void test7() {
vector signed char vsc1 = (vector signed char)(-1);
vector signed char vsc2 = (vector signed char)(-2);
__builtin_strcat(0, 0);
}
-// CHECK: define void @bar(
+// CHECK-LABEL: define void @bar(
void bar() {
float f;
double d;
// CHECK: }
-// CHECK: define void @test_float_builtins
+// CHECK-LABEL: define void @test_float_builtins
void test_float_builtins(float F, double D, long double LD) {
volatile int res;
res = __builtin_isinf(F);
// CHECK: and i1
}
-// CHECK: define void @test_builtin_longjmp
+// CHECK-LABEL: define void @test_builtin_longjmp
void test_builtin_longjmp(void **buffer) {
// CHECK: [[BITCAST:%.*]] = bitcast
// CHECK-NEXT: call void @llvm.eh.sjlj.longjmp(i8* [[BITCAST]])
// CHECK-NEXT: unreachable
}
-// CHECK: define i64 @test_builtin_readcyclecounter
+// CHECK-LABEL: define i64 @test_builtin_readcyclecounter
long long test_builtin_readcyclecounter() {
// CHECK: call i64 @llvm.readcyclecounter()
return __builtin_readcyclecounter();
typedef float float4 __attribute__((ext_vector_type(4)));
typedef unsigned int uint4 __attribute__((ext_vector_type(4)));
-// CHECK: define void @clang_shufflevector_v_v(
+// CHECK-LABEL: define void @clang_shufflevector_v_v(
void clang_shufflevector_v_v( float4* A, float4 x, uint4 mask ) {
// CHECK: [[MASK:%.*]] = and <4 x i32> {{%.*}}, <i32 3, i32 3, i32 3, i32 3>
// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i32 0
*A = __builtin_shufflevector( x, mask );
}
-// CHECK: define void @clang_shufflevector_v_v_c(
+// CHECK-LABEL: define void @clang_shufflevector_v_v_c(
void clang_shufflevector_v_v_c( float4* A, float4 x, float4 y) {
// CHECK: [[V:%.*]] = shufflevector <4 x float> {{%.*}}, <4 x float> {{%.*}}, <4 x i32> <i32 0, i32 4, i32 1, i32 5>
// CHECK: store <4 x float> [[V]], <4 x float>* {{%.*}}
*A = __builtin_shufflevector( x, y, 0, 4, 1, 5 );
}
-// CHECK: define void @clang_shufflevector_v_v_undef(
+// CHECK-LABEL: define void @clang_shufflevector_v_v_undef(
void clang_shufflevector_v_v_undef( float4* A, float4 x, float4 y) {
// CHECK: [[V:%.*]] = shufflevector <4 x float> {{%.*}}, <4 x float> {{%.*}}, <4 x i32> <i32 0, i32 4, i32 undef, i32 5>
// CHECK: store <4 x float> [[V]], <4 x float>* {{%.*}}
// Make sure we don't generate extra memcpy for lvalues
void test1a(struct Test1S, struct Test2S);
-// CHECK: define void @test1(
+// CHECK-LABEL: define void @test1(
// CHECK-NOT: memcpy
// CHECK: call void @test1a
void test1(struct Test1S *A, struct Test2S *B) {
int a,b,c,d,e,f,g,h,i,j,k,l;
};
void test2a(struct Test3S q);
-// CHECK: define void @test2(
+// CHECK-LABEL: define void @test2(
// CHECK: alloca %struct.Test3S, align 8
// CHECK: memcpy
// CHECK: call void @test2a
// But make sure we don't generate a memcpy when we can guarantee alignment.
void fooey(void);
-// CHECK: define void @test3(
+// CHECK-LABEL: define void @test3(
// CHECK: alloca %struct.Test3S, align 8
// CHECK: call void @fooey
// CHECK-NOT: memcpy
void bar(const char *);
-// CHECK: define void @f0()
+// CHECK-LABEL: define void @f0()
void f0() {
bar("hello");
// CHECK: call void @bar({{.*}} @.str
}
-// CHECK: define void @f1()
+// CHECK-LABEL: define void @f1()
void f1() {
static char *x = "hello";
bar(x);
// CHECK: call void @bar(i8* [[T1:%.*]])
}
-// CHECK: define void @f2()
+// CHECK-LABEL: define void @f2()
void f2() {
static char x[] = "hello";
bar(x);
// CHECK: call void @bar({{.*}} @f2.x
}
-// CHECK: define void @f3()
+// CHECK-LABEL: define void @f3()
void f3() {
static char x[8] = "hello";
bar(x);
void gaz(void *);
-// CHECK: define void @f4()
+// CHECK-LABEL: define void @f4()
void f4() {
static struct s {
char *name;
// This work was done in pursuit of <rdar://13338582>.
-// CHECK: define arm_aapcscc void @testFloat(float*
+// CHECK-LABEL: define arm_aapcscc void @testFloat(float*
void testFloat(_Atomic(float) *fp) {
// CHECK: [[FP:%.*]] = alloca float*
// CHECK-NEXT: [[X:%.*]] = alloca float
s &= 42;
}
-// CHECK: define arm_aapcscc void @testFloat(float*
+// CHECK-LABEL: define arm_aapcscc void @testFloat(float*
void testFloat(_Atomic(float) *fp) {
// CHECK: [[FP:%.*]] = alloca float*
// CHECK-NEXT: [[X:%.*]] = alloca float
b();
}
-// CHECK: define internal void @__main_block_invoke
+// CHECK-LABEL: define internal void @__main_block_invoke
// CHECK: [[C1:%.*]] = alloca { double, double }, align 8
// CHECK: [[RP:%.*]] = getelementptr inbounds { double, double }* [[C1]], i32 0, i32 0
// CHECK-NEXT: [[R:%.*]] = load double* [[RP]]
_Complex unsigned char cuc1;
_Complex signed long long csll1;
_Complex unsigned long long cull1;
- // CHECK: define void @foo(
+ // CHECK-LABEL: define void @foo(
// CHECK: alloca i[[CHSIZE:[0-9]+]], align [[CHALIGN:[0-9]+]]
// CHECK-NEXT: alloca i[[CHSIZE]], align [[CHALIGN]]
// CHECK-NEXT: alloca i[[LLSIZE:[0-9]+]], align [[LLALIGN:[0-9]+]]
void a(int,int,int,int,int,int,__complex__ char);
void b(__complex__ char *y) { a(0,0,0,0,0,0,*y); }
-// CHECK: define void @b
+// CHECK-LABEL: define void @b
// CHECK: alloca { i8, i8 }*, align 8
// CHECK: call void @a(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i16 {{.*}})
// CHECK: @x = global { float, float } { float 1.000000e+00, float 0x7FF0000000000000 }, align 4
_Complex float f(float x, float y) { _Complex float z = { x, y }; return z; }
-// CHECK: define <2 x float> @f
+// CHECK-LABEL: define <2 x float> @f
// CHECK: alloca { float, float }
// CHECK: alloca { float, float }
_Complex float f2(float x, float y) { return (_Complex float){ x, y }; }
-// CHECK: define <2 x float> @f2
+// CHECK-LABEL: define <2 x float> @f2
// CHECK: alloca { float, float }
// CHECK: alloca { float, float }
_Complex double * x = &(_Complex double){1.0f};
}
-// CHECK: define void @f()
+// CHECK-LABEL: define void @f()
void f() {
typedef struct S { int x,y; } S;
// CHECK: [[S:%[a-zA-Z0-9.]+]] = alloca [[STRUCT:%[a-zA-Z0-9.]+]],
// CHECK-NEXT: ret void
}
-// CHECK: define i48 @g(
+// CHECK-LABEL: define i48 @g(
struct G { short x, y, z; };
struct G g(int x, int y, int z) {
// CHECK: [[RESULT:%.*]] = alloca [[G:%.*]], align 2
// RUN: %clang_cc1 -emit-llvm %s -o %t
-// Note: define CLANG_GENERATE_KNOWN_GOOD and compile to generate code
+// Note-LABEL: define CLANG_GENERATE_KNOWN_GOOD and compile to generate code
// that makes all of the defaulted arguments explicit. The resulting
// byte code should be identical to the compilation without
// CLANG_GENERATE_KNOWN_GOOD.
const int AA = 5;
-// CHECK: define i32 @f1
+// CHECK-LABEL: define i32 @f1
int f1(enum {AA,BB} E) {
// CHECK: ret i32 1
return BB;
}
-// CHECK: define i32 @f2
+// CHECK-LABEL: define i32 @f2
int f2(enum {AA=7,BB} E) {
// CHECK: ret i32 7
return AA;
void __attribute__((dllimport)) foo1();
void __attribute__((dllexport)) foo1(){}
-// CHECK: define dllexport void @foo1
+// CHECK-LABEL: define dllexport void @foo1
void __attribute__((dllexport)) foo2();
// PR6269
__declspec(dllimport) void foo3();
__declspec(dllexport) void foo3(){}
-// CHECK: define dllexport void @foo3
+// CHECK-LABEL: define dllexport void @foo3
__declspec(dllexport) void foo4();
void test1() {
extern void test1_helper(void (^)(int));
- // CHECK: define void @test1()
- // CHECK-ARM: define arm_aapcscc void @test1()
+ // CHECK-LABEL: define void @test1()
+ // CHECK-ARM-LABEL: define arm_aapcscc void @test1()
__block int x = 10;
}
// rdar://7530813
-// CHECK: define i32 @f11
+// CHECK-LABEL: define i32 @f11
int f11(long X) {
int A[100];
return A[X];
int f12() {
// PR3150
- // CHECK: define i32 @f12
+ // CHECK-LABEL: define i32 @f12
// CHECK: ret i32 1
return 1||1;
}
// Make sure negate of fp uses -0.0 for proper -0 handling.
double f13(double X) {
- // CHECK: define double @f13
+ // CHECK-LABEL: define double @f13
// CHECK: fsub double -0.0
return -X;
}
(void) &*a;
}
-// CHECK: define void @f15
+// CHECK-LABEL: define void @f15
void f15() {
extern void f15_start(void);
f15_start();
}
// PR8967: this was crashing
-// CHECK: define void @f16()
+// CHECK-LABEL: define void @f16()
void f16() {
__extension__({ goto lbl; });
lbl:
}
// PR13704: negative increment in i128 is not preserved.
-// CHECK: define void @f17()
+// CHECK-LABEL: define void @f17()
void f17() {
extern void extfunc(__int128);
__int128 x = 2;
float f0, f1, f2;
void foo(void) {
- // CHECK: define void @foo()
+ // CHECK-LABEL: define void @foo()
// CHECK: fadd fast
f0 = f1 + f2;
float f0, f1, f2;
void foo(void) {
- // CHECK: define void @foo()
+ // CHECK-LABEL: define void @foo()
// CHECK: fadd nnan ninf
f0 = f1 + f2;
volatile float f0, f1, f2;
void foo(void) {
- // CHECK: define void @foo()
+ // CHECK-LABEL: define void @foo()
// Check unary ops
struct frk F;
float _Complex C;
-// CHECK: define void @bar
+// CHECK-LABEL: define void @bar
void bar(void) {
X = foo().f.f.x;
}
-// CHECK: define void @bun
+// CHECK-LABEL: define void @bun
void bun(void) {
F = foo().f.f;
}
-// CHECK: define void @ban
+// CHECK-LABEL: define void @ban
void ban(void) {
C = foo().f.f.c;
}
void f7(unsigned short x) { }
-// CHECK: define void @f8()
+// CHECK-LABEL: define void @f8()
// CHECK: [[AI:#[0-9]+]]
// CHECK: {
void __attribute__((always_inline)) f8(void) { }
// Ensure that these get inlined: rdar://6853279
-// CHECK: define void @f14
+// CHECK-LABEL: define void @f14
// CHECK-NOT: @ai_
// CHECK: call void @f14_end
static __inline__ __attribute__((always_inline))
}
// <rdar://problem/7102668> [irgen] clang isn't setting the optsize bit on functions
-// CHECK: define void @f15
+// CHECK-LABEL: define void @f15
// CHECK: [[NUW]]
// CHECK: {
void f15(void) {
}
// PR5254
-// CHECK: define void @f16
+// CHECK-LABEL: define void @f16
// CHECK: [[ALIGN:#[0-9]+]]
// CHECK: {
void __attribute__((force_align_arg_pointer)) f16(void) {
}
// PR11038
-// CHECK: define void @f18()
+// CHECK-LABEL: define void @f18()
// CHECK: [[RT:#[0-9]+]]
// CHECK: {
// CHECK: call void @f17()
f17();
}
-// CHECK: define void @f19()
+// CHECK-LABEL: define void @f19()
// CHECK: {
// CHECK: call i32 @setjmp(i32* null)
// CHECK: [[RT_CALL]]
int a() {return 1;}
void f0() {}
-// CHECK: define void @f0()
+// CHECK-LABEL: define void @f0()
void f1();
void f2(void) {
// CHECK: call void @f1()
f1(1, 2, 3);
}
-// CHECK: define void @f1()
+// CHECK-LABEL: define void @f1()
void f1() {}
// CHECK: define {{.*}} @f3{{\(\)|\(.*sret.*\)}}
void f8_user(void (*callback)(struct Incomplete));
void f8_test() {
f8_user(&f8_callback);
-// CHECK: define void @f8_test()
+// CHECK-LABEL: define void @f8_test()
// CHECK: call void @f8_user({{.*}}* bitcast (void ()* @f8_callback to {{.*}}*))
// CHECK: declare void @f8_user({{.*}}*)
// CHECK: declare void @f8_callback()
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
// CHECK: ModuleID
// CHECK-NOT: opaque
-// CHECK: define void @f0
+// CHECK-LABEL: define void @f0
enum teste1 test1f(void), (*test1)(void) = test1f;
struct tests2 test2f(), (*test2)() = test2f;
// RUN: echo "GNU89 tests:"
// RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=gnu89 | FileCheck %s --check-prefix=CHECK1
-// CHECK1: define i32 @foo()
-// CHECK1: define i32 @bar()
-// CHECK1: define void @unreferenced1()
+// CHECK1-LABEL: define i32 @foo()
+// CHECK1-LABEL: define i32 @bar()
+// CHECK1-LABEL: define void @unreferenced1()
// CHECK1-NOT: unreferenced2
-// CHECK1: define void @gnu_inline()
-// CHECK1: define i32 @test1
-// CHECK1: define i32 @test2
-// CHECK1: define void @test3()
-// CHECK1: define available_externally i32 @test4
-// CHECK1: define available_externally i32 @test5
-// CHECK1: define i32 @test6
-// CHECK1: define void @test7
+// CHECK1-LABEL: define void @gnu_inline()
+// CHECK1-LABEL: define i32 @test1
+// CHECK1-LABEL: define i32 @test2
+// CHECK1-LABEL: define void @test3()
+// CHECK1-LABEL: define available_externally i32 @test4
+// CHECK1-LABEL: define available_externally i32 @test5
+// CHECK1-LABEL: define i32 @test6
+// CHECK1-LABEL: define void @test7
// CHECK1: define i{{..}} @strlcpy
// CHECK1-NOT: test9
-// CHECK1: define void @testA
-// CHECK1: define void @testB
-// CHECK1: define void @testC
-// CHECK1: define available_externally void @gnu_ei_inline()
-// CHECK1: define available_externally i32 @ei()
+// CHECK1-LABEL: define void @testA
+// CHECK1-LABEL: define void @testB
+// CHECK1-LABEL: define void @testC
+// CHECK1-LABEL: define available_externally void @gnu_ei_inline()
+// CHECK1-LABEL: define available_externally i32 @ei()
// RUN: echo "C99 tests:"
// RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=gnu99 | FileCheck %s --check-prefix=CHECK2
-// CHECK2: define i32 @ei()
-// CHECK2: define i32 @bar()
+// CHECK2-LABEL: define i32 @ei()
+// CHECK2-LABEL: define i32 @bar()
// CHECK2-NOT: unreferenced1
-// CHECK2: define void @unreferenced2()
-// CHECK2: define void @gnu_inline()
-// CHECK2: define i32 @test1
-// CHECK2: define i32 @test2
-// CHECK2: define void @test3
-// CHECK2: define available_externally i32 @test4
-// CHECK2: define available_externally i32 @test5
-// CHECK2: define i32 @test6
-// CHECK2: define void @test7
+// CHECK2-LABEL: define void @unreferenced2()
+// CHECK2-LABEL: define void @gnu_inline()
+// CHECK2-LABEL: define i32 @test1
+// CHECK2-LABEL: define i32 @test2
+// CHECK2-LABEL: define void @test3
+// CHECK2-LABEL: define available_externally i32 @test4
+// CHECK2-LABEL: define available_externally i32 @test5
+// CHECK2-LABEL: define i32 @test6
+// CHECK2-LABEL: define void @test7
// CHECK2: define available_externally i{{..}} @strlcpy
-// CHECK2: define void @test9
-// CHECK2: define void @testA
-// CHECK2: define void @testB
-// CHECK2: define void @testC
-// CHECK2: define available_externally void @gnu_ei_inline()
-// CHECK2: define available_externally i32 @foo()
+// CHECK2-LABEL: define void @test9
+// CHECK2-LABEL: define void @testA
+// CHECK2-LABEL: define void @testB
+// CHECK2-LABEL: define void @testC
+// CHECK2-LABEL: define available_externally void @gnu_ei_inline()
+// CHECK2-LABEL: define available_externally i32 @foo()
// RUN: echo "C++ tests:"
// RUN: %clang -x c++ %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=c++98 | FileCheck %s --check-prefix=CHECK3
-// CHECK3: define i32 @_Z3barv()
-// CHECK3: define linkonce_odr i32 @_Z3foov()
+// CHECK3-LABEL: define i32 @_Z3barv()
+// CHECK3-LABEL: define linkonce_odr i32 @_Z3foov()
// CHECK3-NOT: unreferenced
-// CHECK3: define void @_Z10gnu_inlinev()
-// CHECK3: define available_externally void @_Z13gnu_ei_inlinev()
-// CHECK3: define linkonce_odr i32 @_Z2eiv()
+// CHECK3-LABEL: define void @_Z10gnu_inlinev()
+// CHECK3-LABEL: define available_externally void @_Z13gnu_ei_inlinev()
+// CHECK3-LABEL: define linkonce_odr i32 @_Z2eiv()
// RUN: echo "MS C Mode tests:"
// RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o - -std=c99 -fms-compatibility | FileCheck %s --check-prefix=CHECK4
-// CHECK4: define i32 @bar()
-// CHECK4: define void @gnu_inline()
-// CHECK4: define available_externally void @gnu_ei_inline()
-// CHECK4: define linkonce_odr i32 @foo()
+// CHECK4-LABEL: define i32 @bar()
+// CHECK4-LABEL: define void @gnu_inline()
+// CHECK4-LABEL: define available_externally void @gnu_ei_inline()
+// CHECK4-LABEL: define linkonce_odr i32 @foo()
// CHECK4-NOT: unreferenced
-// CHECK4: define linkonce_odr i32 @ei()
+// CHECK4-LABEL: define linkonce_odr i32 @ei()
extern __inline int ei() { return 123; }
// RUN: %clang_cc1 -O1 -std=gnu89 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-GNU89 %s
// RUN: %clang_cc1 -O1 -std=c99 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-C99 %s
-// CHECK-GNU89: define i32 @f0()
-// CHECK-C99: define i32 @f0()
+// CHECK-GNU89-LABEL: define i32 @f0()
+// CHECK-C99-LABEL: define i32 @f0()
int f0(void);
int f0(void) { return 0; }
-// CHECK-GNU89: define i32 @f1()
-// CHECK-C99: define i32 @f1()
+// CHECK-GNU89-LABEL: define i32 @f1()
+// CHECK-C99-LABEL: define i32 @f1()
inline int f1(void);
int f1(void) { return 0; }
-// CHECK-GNU89: define i32 @f2()
-// CHECK-C99: define i32 @f2()
+// CHECK-GNU89-LABEL: define i32 @f2()
+// CHECK-C99-LABEL: define i32 @f2()
int f2(void);
inline int f2(void) { return 0; }
-// CHECK-GNU89: define i32 @f3()
-// CHECK-C99: define i32 @f3()
+// CHECK-GNU89-LABEL: define i32 @f3()
+// CHECK-C99-LABEL: define i32 @f3()
extern inline int f3(void);
int f3(void) { return 0; }
-// CHECK-GNU89: define i32 @f5()
-// CHECK-C99: define i32 @f5()
+// CHECK-GNU89-LABEL: define i32 @f5()
+// CHECK-C99-LABEL: define i32 @f5()
extern inline int f5(void);
inline int f5(void) { return 0; }
-// CHECK-GNU89: define i32 @f6()
-// CHECK-C99: define i32 @f6()
+// CHECK-GNU89-LABEL: define i32 @f6()
+// CHECK-C99-LABEL: define i32 @f6()
inline int f6(void);
extern inline int f6(void) { return 0; }
-// CHECK-GNU89: define i32 @f7()
-// CHECK-C99: define i32 @f7()
+// CHECK-GNU89-LABEL: define i32 @f7()
+// CHECK-C99-LABEL: define i32 @f7()
extern inline int f7(void);
extern int f7(void) { return 0; }
-// CHECK-GNU89: define i32 @fA()
+// CHECK-GNU89-LABEL: define i32 @fA()
inline int fA(void) { return 0; }
-// CHECK-GNU89: define available_externally i32 @f4()
-// CHECK-C99: define i32 @f4()
+// CHECK-GNU89-LABEL: define available_externally i32 @f4()
+// CHECK-C99-LABEL: define i32 @f4()
int f4(void);
extern inline int f4(void) { return 0; }
-// CHECK-GNU89: define available_externally i32 @f8()
-// CHECK-C99: define i32 @f8()
+// CHECK-GNU89-LABEL: define available_externally i32 @f8()
+// CHECK-C99-LABEL: define i32 @f8()
extern int f8(void);
extern inline int f8(void) { return 0; }
-// CHECK-GNU89: define available_externally i32 @f9()
-// CHECK-C99: define i32 @f9()
+// CHECK-GNU89-LABEL: define available_externally i32 @f9()
+// CHECK-C99-LABEL: define i32 @f9()
extern inline int f9(void);
extern inline int f9(void) { return 0; }
-// CHECK-C99: define available_externally i32 @fA()
+// CHECK-C99-LABEL: define available_externally i32 @fA()
int test_all() {
return f0() + f1() + f2() + f3() + f4() + f5() + f6() + f7() + f8() + f9()
// Tests for signed integer overflow stuff.
// rdar://7432000 rdar://7221421
void test1() {
- // DEFAULT: define void @test1
- // WRAPV: define void @test1
- // TRAPV: define void @test1
+ // DEFAULT-LABEL: define void @test1
+ // WRAPV-LABEL: define void @test1
+ // TRAPV-LABEL: define void @test1
extern volatile int f11G, a, b;
// DEFAULT: add nsw i32
// Basic argument/attribute tests for le32/PNaCl
-// CHECK: define void @f0(i32 %i, i32 %j, double %k)
+// CHECK-LABEL: define void @f0(i32 %i, i32 %j, double %k)
void f0(int i, long j, double k) {}
typedef struct {
int bb;
} s1;
// Structs should be passed byval and not split up
-// CHECK: define void @f1(%struct.s1* byval %i)
+// CHECK-LABEL: define void @f1(%struct.s1* byval %i)
void f1(s1 i) {}
typedef struct {
int cc;
} s2;
// Structs should be returned sret and not simplified by the frontend
-// CHECK: define void @f2(%struct.s2* noalias sret %agg.result)
+// CHECK-LABEL: define void @f2(%struct.s2* noalias sret %agg.result)
s2 f2() {
s2 foo;
return foo;
}
-// CHECK: define void @f3(i64 %i)
+// CHECK-LABEL: define void @f3(i64 %i)
void f3(long long i) {}
// i8/i16 should be signext, i32 and higher should not
-// CHECK: define void @f4(i8 signext %a, i16 signext %b)
+// CHECK-LABEL: define void @f4(i8 signext %a, i16 signext %b)
void f4(char a, short b) {}
-// CHECK: define void @f5(i8 zeroext %a, i16 zeroext %b)
+// CHECK-LABEL: define void @f5(i8 zeroext %a, i16 zeroext %b)
void f5(unsigned char a, unsigned short b) {}
ENUM3,
};
// Enums should be treated as the underlying i32
-// CHECK: define void @f6(i32 %a)
+// CHECK-LABEL: define void @f6(i32 %a)
void f6(enum my_enum a) {}
union simple_union {
char b;
};
// Unions should be passed as byval structs
-// CHECK: define void @f7(%union.simple_union* byval %s)
+// CHECK-LABEL: define void @f7(%union.simple_union* byval %s)
void f7(union simple_union s) {}
typedef struct {
int b8 : 8;
} bitfield1;
// Bitfields should be passed as byval structs
-// CHECK: define void @f8(%struct.bitfield1* byval %bf1)
+// CHECK-LABEL: define void @f8(%struct.bitfield1* byval %bf1)
void f8(bitfield1 bf1) {}
double pow(double, double);
long double powl(long double, long double);
-// CHECK: define void @test_pow
+// CHECK-LABEL: define void @test_pow
void test_pow(float a0, double a1, long double a2) {
// CHECK: call float @powf
float l0 = powf(a0, a0);
// RUN: %clang_cc1 -fmath-errno -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-YES %s
// RUN: %clang_cc1 -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix CHECK-NO %s
-// CHECK-YES: define void @test_sqrt
-// CHECK-NO: define void @test_sqrt
+// CHECK-YES-LABEL: define void @test_sqrt
+// CHECK-NO-LABEL: define void @test_sqrt
void test_sqrt(float a0, double a1, long double a2) {
// Following llvm-gcc's lead, we never emit these as intrinsics;
// no-math-errno isn't good enough. We could probably use intrinsics
// CHECK-NO: declare double @sqrt(double) [[NUW_RN]]
// CHECK-NO: declare x86_fp80 @sqrtl(x86_fp80) [[NUW_RN]]
-// CHECK-YES: define void @test_pow
-// CHECK-NO: define void @test_pow
+// CHECK-YES-LABEL: define void @test_pow
+// CHECK-NO-LABEL: define void @test_pow
void test_pow(float a0, double a1, long double a2) {
// CHECK-YES: call float @powf
// CHECK-NO: call float @llvm.pow.f32
// CHECK-NO: declare double @llvm.pow.f64(double, double) [[NUW_RO]]
// CHECK-NO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[NUW_RO]]
-// CHECK-YES: define void @test_fma
-// CHECK-NO: define void @test_fma
+// CHECK-YES-LABEL: define void @test_fma
+// CHECK-NO-LABEL: define void @test_fma
void test_fma(float a0, double a1, long double a2) {
// CHECK-YES: call float @llvm.fma.f32
// CHECK-NO: call float @llvm.fma.f32
#else
-// CHECK-NO-BC: define i32 @g
+// CHECK-NO-BC-LABEL: define i32 @g
// CHECK-NO-BC: ret i32 42
int g(void) {
return f();
}
-// CHECK-NO-BC: define i32 @f
+// CHECK-NO-BC-LABEL: define i32 @f
#endif
}
extern void f(int x) { } // still has internal linkage
-// CHECK: define internal void @f
+// CHECK-LABEL: define internal void @f
long double x = 0;
int checksize[sizeof(x) == 8 ? 1 : -1];
-// CHECK: define void @s1(double %a)
+// CHECK-LABEL: define void @s1(double %a)
void s1(long double a) {}
void __fastcall f1(void);
void __stdcall f2(void);
void __fastcall f4(void) {
-// CHECK: define void @f4()
+// CHECK-LABEL: define void @f4()
f1();
// CHECK: call void @f1()
}
void __stdcall f5(void) {
-// CHECK: define void @f5()
+// CHECK-LABEL: define void @f5()
f2();
// CHECK: call void @f2()
}
void __stdcall f2(void);
void __thiscall f3(void);
void __fastcall f4(void) {
-// CHECK: define x86_fastcallcc void @f4()
+// CHECK-LABEL: define x86_fastcallcc void @f4()
f1();
// CHECK: call x86_fastcallcc void @f1()
}
void __stdcall f5(void) {
-// CHECK: define x86_stdcallcc void @f5()
+// CHECK-LABEL: define x86_stdcallcc void @f5()
f2();
// CHECK: call x86_stdcallcc void @f2()
}
void __thiscall f6(void) {
-// CHECK: define x86_thiscallcc void @f6()
+// CHECK-LABEL: define x86_thiscallcc void @f6()
f3();
// CHECK: call x86_thiscallcc void @f3()
}
extern void foo2(S0);
-// O32: define void @foo1(i32 %a0.coerce0, i32 %a0.coerce1, i32 %a0.coerce2)
-// N64: define void @foo1(i64 %a0.coerce0, i32 %a0.coerce1)
+// O32-LABEL: define void @foo1(i32 %a0.coerce0, i32 %a0.coerce1, i32 %a0.coerce2)
+// N64-LABEL: define void @foo1(i64 %a0.coerce0, i32 %a0.coerce1)
void foo1(S0 a0) {
foo2(a0);
typedef double v4df __attribute__ ((__vector_size__ (32)));
typedef int v4i32 __attribute__ ((__vector_size__ (16)));
-// O32: define void @test_v4sf(<4 x float>* noalias nocapture sret
+// O32-LABEL: define void @test_v4sf(<4 x float>* noalias nocapture sret
// N64: define { i64, i64 } @test_v4sf
v4sf test_v4sf(float a) {
return (v4sf){0.0f, a, 0.0f, 0.0f};
}
-// O32: define void @test_v4df(<4 x double>* noalias nocapture sret
-// N64: define void @test_v4df(<4 x double>* noalias nocapture sret
+// O32-LABEL: define void @test_v4df(<4 x double>* noalias nocapture sret
+// N64-LABEL: define void @test_v4df(<4 x double>* noalias nocapture sret
v4df test_v4df(double a) {
return (v4df){0.0, a, 0.0, 0.0};
}
return gd1;
}
-// CHECK: define void @_Z4foo32D2(i64 %a0.coerce0, double %a0.coerce1)
+// CHECK-LABEL: define void @_Z4foo32D2(i64 %a0.coerce0, double %a0.coerce1)
void foo3(D2 a0) {
gd2 = a0;
}
-// CHECK: define void @_Z4foo42D0(i64 %a0.coerce0, i64 %a0.coerce1)
+// CHECK-LABEL: define void @_Z4foo42D0(i64 %a0.coerce0, i64 %a0.coerce1)
void foo4(D0 a0) {
gd0 = a0;
}
// Insert padding to ensure arguments of type S0 are aligned to 16-byte boundaries.
-// N64: define void @foo1(i32 %a0, i64, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 %b, i64, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3)
+// N64-LABEL: define void @foo1(i32 %a0, i64, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 %b, i64, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3)
// N64: tail call void @foo2(i32 1, i32 2, i32 %a0, i64 undef, double %a1.coerce0, i64 %a1.coerce1, i64 %a1.coerce2, i64 %a1.coerce3, double %a2.coerce0, i64 %a2.coerce1, i64 %a2.coerce2, i64 %a2.coerce3, i32 3, i64 undef, double %a3.coerce0, i64 %a3.coerce1, i64 %a3.coerce2, i64 %a3.coerce3)
// N64: declare void @foo2(i32, i32, i32, i64, double, i64, i64, i64, double, i64, i64, i64, i32, i64, double, i64, i64, i64)
// Insert padding before long double argument.
//
-// N64: define void @foo3(i32 %a0, i64, fp128 %a1)
+// N64-LABEL: define void @foo3(i32 %a0, i64, fp128 %a1)
// N64: tail call void @foo4(i32 1, i32 2, i32 %a0, i64 undef, fp128 %a1)
// N64: declare void @foo4(i32, i32, i32, i64, fp128)
// Insert padding after hidden argument.
//
-// N64: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0)
+// N64-LABEL: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0)
// N64: call void @foo6(%struct.S0* sret %agg.result, i32 1, i32 2, i64 undef, fp128 %a0)
// N64: declare void @foo6(%struct.S0* sret, i32, i32, i64, fp128)
// Do not insert padding if ABI is O32.
//
-// O32: define void @foo7(float %a0, double %a1)
+// O32-LABEL: define void @foo7(float %a0, double %a1)
// O32: declare void @foo8(float, double)
extern void foo8(float, double);
// CHECK: call void asm sideeffect inteldialect "mov eax, $0", "r,~{eax},~{dirflag},~{fpsr},~{flags}"(i32** @_ZN3Foo3Bar3ptrE)
}
-// CHECK: define void @_Z2t3v()
+// CHECK-LABEL: define void @_Z2t3v()
void t3() {
__asm mov eax, LENGTH Foo::ptr
// CHECK: call void asm sideeffect inteldialect "mov eax, $$1", "~{eax},~{dirflag},~{fpsr},~{flags}"()
void test();
};
-// CHECK: define void @_ZN2T44testEv(
+// CHECK-LABEL: define void @_ZN2T44testEv(
void T4::test() {
// CHECK: [[T0:%.*]] = alloca [[T4:%.*]]*,
// CHECK: [[THIS:%.*]] = load [[T4]]** [[T0]]
template <class U> static T create(U);
void run();
};
-// CHECK: define void @_Z5test5v()
+// CHECK-LABEL: define void @_Z5test5v()
void test5() {
// CHECK: [[X:%.*]] = alloca i32
// CHECK: [[Y:%.*]] = alloca i32
gs = gs;
ls = gs;
}
-// CHECK: define void @foo()
+// CHECK-LABEL: define void @foo()
// CHECK: %[[LS:.*]] = alloca %struct.s, align 4
// CHECK-NEXT: %[[ZERO:.*]] = bitcast %struct.s* %[[LS]] to i8*
// CHECK-NEXT: %[[ONE:.*]] = bitcast %struct.s* %[[LS]] to i8*
s = s;
s.y = gs;
}
-// CHECK: define void @fee()
+// CHECK-LABEL: define void @fee()
// CHECK: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
char *gp;
int gi, gj;
-// CHECK: define void @test1
+// CHECK-LABEL: define void @test1
void test1() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i64 4), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 59)
strcpy(&gbuf[4], "Hi there");
}
-// CHECK: define void @test2
+// CHECK-LABEL: define void @test2
void test2() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 63)
strcpy(gbuf, "Hi there");
}
-// CHECK: define void @test3
+// CHECK-LABEL: define void @test3
void test3() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i64 1, i64 37), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 0)
strcpy(&gbuf[100], "Hi there");
}
-// CHECK: define void @test4
+// CHECK-LABEL: define void @test4
void test4() {
// CHECK: = call i8* @__strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i64 -1), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i64 0)
strcpy((char*)(void*)&gbuf[-1], "Hi there");
}
-// CHECK: define void @test5
+// CHECK-LABEL: define void @test5
void test5() {
// CHECK: = load i8** @gp
// CHECK-NEXT:= call i64 @llvm.objectsize.i64(i8* %{{.*}}, i1 false)
strcpy(gp, "Hi there");
}
-// CHECK: define void @test6
+// CHECK-LABEL: define void @test6
void test6() {
char buf[57];
strcpy(&buf[4], "Hi there");
}
-// CHECK: define void @test7
+// CHECK-LABEL: define void @test7
void test7() {
int i;
// Ensure we only evaluate the side-effect once.
strcpy((++i, gbuf), "Hi there");
}
-// CHECK: define void @test8
+// CHECK-LABEL: define void @test8
void test8() {
char *buf[50];
// CHECK-NOT: __strcpy_chk
strcpy(buf[++gi], "Hi there");
}
-// CHECK: define void @test9
+// CHECK-LABEL: define void @test9
void test9() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0))
strcpy((char *)((++gi) + gj), "Hi there");
}
-// CHECK: define void @test10
+// CHECK-LABEL: define void @test10
char **p;
void test10() {
// CHECK-NOT: __strcpy_chk
strcpy(*(++p), "Hi there");
}
-// CHECK: define void @test11
+// CHECK-LABEL: define void @test11
void test11() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* getelementptr inbounds ([63 x i8]* @gbuf, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0))
strcpy(gp = gbuf, "Hi there");
}
-// CHECK: define void @test12
+// CHECK-LABEL: define void @test12
void test12() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0))
strcpy(++gp, "Hi there");
}
-// CHECK: define void @test13
+// CHECK-LABEL: define void @test13
void test13() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0))
strcpy(gp++, "Hi there");
}
-// CHECK: define void @test14
+// CHECK-LABEL: define void @test14
void test14() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0))
strcpy(--gp, "Hi there");
}
-// CHECK: define void @test15
+// CHECK-LABEL: define void @test15
void test15() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{..*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0))
strcpy(gp--, "Hi there");
}
-// CHECK: define void @test16
+// CHECK-LABEL: define void @test16
void test16() {
// CHECK-NOT: __strcpy_chk
// CHECK: = call i8* @__inline_strcpy_chk(i8* %{{.*}}, i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0))
// CHECK: @align3_x0 = global i32 4
int align3_x0 = __alignof(((struct s3*) 0)->x[0]);
-// CHECK: define i32 @f0_a
+// CHECK-LABEL: define i32 @f0_a
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
-// CHECK: define i32 @f0_b
+// CHECK-LABEL: define i32 @f0_b
// CHECK: load i32* %{{.*}}, align 4
// CHECK: }
int f0_a(struct s0 *a) {
// Note that we are incompatible with GCC on this example.
//
-// CHECK: define i32 @f1_a
+// CHECK-LABEL: define i32 @f1_a
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
-// CHECK: define i32 @f1_b
+// CHECK-LABEL: define i32 @f1_b
// CHECK: load i32* %{{.*}}, align 4
// CHECK: }
// Note that we are incompatible with GCC on this example.
//
-// CHECK: define i32 @f1_c
+// CHECK-LABEL: define i32 @f1_c
// CHECK: load i32* %{{.*}}, align 4
// CHECK: }
-// CHECK: define i32 @f1_d
+// CHECK-LABEL: define i32 @f1_d
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
int f1_a(struct s1 *a) {
return a->z;
}
-// CHECK: define i32 @f2_a
+// CHECK-LABEL: define i32 @f2_a
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
-// CHECK: define i32 @f2_b
+// CHECK-LABEL: define i32 @f2_b
// CHECK: load i32* %{{.*}}, align 4
// CHECK: }
-// CHECK: define i32 @f2_c
+// CHECK-LABEL: define i32 @f2_c
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
-// CHECK: define i32 @f2_d
+// CHECK-LABEL: define i32 @f2_d
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
int f2_a(struct s2 *a) {
return a->z;
}
-// CHECK: define i32 @f3_a
+// CHECK-LABEL: define i32 @f3_a
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
-// CHECK: define i32 @f3_b
+// CHECK-LABEL: define i32 @f3_b
// CHECK: load i32* %{{.*}}, align 4
// CHECK: }
-// CHECK: define i32 @f3_c
+// CHECK-LABEL: define i32 @f3_c
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
-// CHECK: define i32 @f3_d
+// CHECK-LABEL: define i32 @f3_d
// CHECK: load i32* %{{.*}}, align 1
// CHECK: }
int f3_a(struct s3 *a) {
// Verify we don't claim things are overaligned.
//
-// CHECK: define double @f4
+// CHECK-LABEL: define double @f4
// CHECK: load double* {{.*}}, align 8
// CHECK: }
extern double g4[5] __attribute__((aligned(16)));
int s0_align_y = __alignof(((struct s0*)0)->y);
int s0_align = __alignof(struct s0);
-// CHECK-FUNCTIONS: define i32 @s0_load_x
+// CHECK-FUNCTIONS-LABEL: define i32 @s0_load_x
// CHECK-FUNCTIONS: [[s0_load_x:%.*]] = load i32* {{.*}}, align 4
// CHECK-FUNCTIONS: ret i32 [[s0_load_x]]
int s0_load_x(struct s0 *a) { return a->x; }
// has changed in llvm-gcc recently, previously both x and y would be loaded
// with align 1 (in 2363.1 at least).
//
-// CHECK-FUNCTIONS: define i32 @s0_load_y
+// CHECK-FUNCTIONS-LABEL: define i32 @s0_load_y
// CHECK-FUNCTIONS: [[s0_load_y:%.*]] = load i32* {{.*}}, align 1
// CHECK-FUNCTIONS: ret i32 [[s0_load_y]]
int s0_load_y(struct s0 *a) { return a->y; }
-// CHECK-FUNCTIONS: define void @s0_copy
+// CHECK-FUNCTIONS-LABEL: define void @s0_copy
// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 4, i1 false)
void s0_copy(struct s0 *a, struct s0 *b) { *b = *a; }
int s1_align_y = __alignof(((struct s1*)0)->y);
int s1_align = __alignof(struct s1);
-// CHECK-FUNCTIONS: define i32 @s1_load_x
+// CHECK-FUNCTIONS-LABEL: define i32 @s1_load_x
// CHECK-FUNCTIONS: [[s1_load_x:%.*]] = load i32* {{.*}}, align 1
// CHECK-FUNCTIONS: ret i32 [[s1_load_x]]
int s1_load_x(struct s1 *a) { return a->x; }
-// CHECK-FUNCTIONS: define i32 @s1_load_y
+// CHECK-FUNCTIONS-LABEL: define i32 @s1_load_y
// CHECK-FUNCTIONS: [[s1_load_y:%.*]] = load i32* {{.*}}, align 1
// CHECK-FUNCTIONS: ret i32 [[s1_load_y]]
int s1_load_y(struct s1 *a) { return a->y; }
-// CHECK-FUNCTIONS: define void @s1_copy
+// CHECK-FUNCTIONS-LABEL: define void @s1_copy
// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 1, i1 false)
void s1_copy(struct s1 *a, struct s1 *b) { *b = *a; }
int s2_align_y = __alignof(((struct s2*)0)->y);
int s2_align = __alignof(struct s2);
-// CHECK-FUNCTIONS: define i32 @s2_load_x
+// CHECK-FUNCTIONS-LABEL: define i32 @s2_load_x
// CHECK-FUNCTIONS: [[s2_load_y:%.*]] = load i32* {{.*}}, align 2
// CHECK-FUNCTIONS: ret i32 [[s2_load_y]]
int s2_load_x(struct s2 *a) { return a->x; }
-// CHECK-FUNCTIONS: define i32 @s2_load_y
+// CHECK-FUNCTIONS-LABEL: define i32 @s2_load_y
// CHECK-FUNCTIONS: [[s2_load_y:%.*]] = load i32* {{.*}}, align 2
// CHECK-FUNCTIONS: ret i32 [[s2_load_y]]
int s2_load_y(struct s2 *a) { return a->y; }
-// CHECK-FUNCTIONS: define void @s2_copy
+// CHECK-FUNCTIONS-LABEL: define void @s2_copy
// CHECK-FUNCTIONS: call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.*}}, i8* {{.*}}, i64 8, i32 2, i1 false)
void s2_copy(struct s2 *a, struct s2 *b) { *b = *a; }
};
// CHECK-GLOBAL: @s3_1 = global i32 1
int s3_1 = __alignof(((struct s3*) 0)->anInt);
-// CHECK-FUNCTIONS: define i32 @test3(
+// CHECK-FUNCTIONS-LABEL: define i32 @test3(
int test3(struct s3 *ptr) {
// CHECK-FUNCTIONS: [[PTR:%.*]] = getelementptr inbounds {{%.*}}* {{%.*}}, i32 0, i32 1
// CHECK-FUNCTIONS-NEXT: load i32* [[PTR]], align 1
void bar(Sf a, Sd b, SSf d, SSd e) {}
-// CHECK: define void @bar
+// CHECK-LABEL: define void @bar
// CHECK: %a = alloca %struct.s1, align 4
// CHECK: %b = alloca %struct.s2, align 8
// CHECK: %d = alloca %struct.s4, align 4
bar(p1, p2, p4, p5);
}
-// CHECK: define void @foo
+// CHECK-LABEL: define void @foo
// CHECK: %{{[a-zA-Z0-9.]+}} = getelementptr %struct.s1* %p1, i32 0, i32 0
// CHECK: %{{[0-9]+}} = load float* %{{[a-zA-Z0-9.]+}}, align 1
// CHECK: %{{[a-zA-Z0-9.]+}} = getelementptr %struct.s2* %p2, i32 0, i32 0
return a.v;
}
-// CHECK: define <4 x float> @foo(<4 x float> inreg %a.coerce)
+// CHECK-LABEL: define <4 x float> @foo(<4 x float> inreg %a.coerce)
// CHECK: ret <4 x float> %a.coerce
return *x;
}
-// CHECK: define i32 @g1
+// CHECK-LABEL: define i32 @g1
// CHECK: load i32* %x, align 4
// CHECK-NOT: range
// CHECK: ret
strrchr_foo("", '.');
}
-// CHECK: define void @f()
+// CHECK-LABEL: define void @f()
// CHECK: call void @foo()
// CHECK-NEXT: call void @bar()
// CHECK-NEXT: call i8* @strrchr(
#pragma GCC visibility push(hidden)
void f() {}
-// CHECK: define hidden void @f
+// CHECK-LABEL: define hidden void @f
__attribute((visibility("default"))) void g();
void g() {}
-// CHECK: define void @g
+// CHECK-LABEL: define void @g
-// CHECK: define weak void @weakdef()
+// CHECK-LABEL: define weak void @weakdef()
#pragma weak weakvar
#pragma weak foo = __foo
void __foo(void) {}
-// CHECK: define void @__foo()
+// CHECK-LABEL: define void @__foo()
void __foo2(void) {}
#pragma weak foo2 = __foo2
-// CHECK: define void @__foo2()
+// CHECK-LABEL: define void @__foo2()
///// test errors
#pragma weak stutter = __stutter
#pragma weak stutter = __stutter
void __stutter(void) {}
-// CHECK: define void @__stutter()
+// CHECK-LABEL: define void @__stutter()
void __stutter2(void) {}
#pragma weak stutter2 = __stutter2
#pragma weak stutter2 = __stutter2
-// CHECK: define void @__stutter2()
+// CHECK-LABEL: define void @__stutter2()
// test decl/pragma weak order
void __declfirst(void);
#pragma weak declfirst = __declfirst
void __declfirst(void) {}
-// CHECK: define void @__declfirst()
+// CHECK-LABEL: define void @__declfirst()
void __declfirstattr(void) __attribute((noinline));
#pragma weak declfirstattr = __declfirstattr
void __declfirstattr(void) {}
-// CHECK: define void @__declfirstattr()
+// CHECK-LABEL: define void @__declfirstattr()
//// test that other attributes are preserved
void mix(void);
#pragma weak mix
__attribute((weak)) void mix(void) { }
-// CHECK: define weak void @mix()
+// CHECK-LABEL: define weak void @mix()
// ensure following __attributes are preserved and that only a single
// alias is generated
void __mix2(void) __attribute((noinline));
void __mix2(void) __attribute((noinline));
void __mix2(void) {}
-// CHECK: define void @__mix2()
+// CHECK-LABEL: define void @__mix2()
////////////// test #pragma weak/__attribute combinations
void both(void) __attribute((alias("__both")));
#pragma weak both = __both
void __both(void) {}
-// CHECK: define void @__both()
+// CHECK-LABEL: define void @__both()
// if the TARGET is previously declared then whichever aliasing method
// comes first applies and subsequent aliases are discarded.
void both2(void) __attribute((alias("__both2"))); // first, wins
#pragma weak both2 = __both2
void __both2(void) {}
-// CHECK: define void @__both2()
+// CHECK-LABEL: define void @__both2()
void __both3(void);
#pragma weak both3 = __both3 // first, wins
void both3(void) __attribute((alias("__both3")));
void __both3(void) {}
-// CHECK: define void @__both3()
+// CHECK-LABEL: define void @__both3()
///////////// ensure that #pragma weak does not alter existing __attributes()
void zzz(void){}
#pragma weak yyy
// NOTE: weak doesn't apply, not before or in same TopLevelDec(!)
-// CHECK: define void @yyy()
+// CHECK-LABEL: define void @yyy()
int correct_linkage;
// PR7025
void FASTCALL f1(int i, int j, int k);
-// CHECK: define void @f1(i32 inreg %i, i32 inreg %j, i32 %k)
+// CHECK-LABEL: define void @f1(i32 inreg %i, i32 inreg %j, i32 %k)
void f1(int i, int j, int k) { }
int
// RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s
#include <stdarg.h>
-// CHECK: define void @f_void()
+// CHECK-LABEL: define void @f_void()
void f_void(void) {}
// Arguments and return values smaller than the word size are extended.
-// CHECK: define signext i32 @f_int_1(i32 signext %x)
+// CHECK-LABEL: define signext i32 @f_int_1(i32 signext %x)
int f_int_1(int x) { return x; }
-// CHECK: define zeroext i32 @f_int_2(i32 zeroext %x)
+// CHECK-LABEL: define zeroext i32 @f_int_2(i32 zeroext %x)
unsigned f_int_2(unsigned x) { return x; }
-// CHECK: define i64 @f_int_3(i64 %x)
+// CHECK-LABEL: define i64 @f_int_3(i64 %x)
long long f_int_3(long long x) { return x; }
-// CHECK: define signext i8 @f_int_4(i8 signext %x)
+// CHECK-LABEL: define signext i8 @f_int_4(i8 signext %x)
char f_int_4(char x) { return x; }
// Small structs are passed in registers.
int *a, *b;
};
-// CHECK: define %struct.small @f_small(i32* %x.coerce0, i32* %x.coerce1)
+// CHECK-LABEL: define %struct.small @f_small(i32* %x.coerce0, i32* %x.coerce1)
struct small f_small(struct small x) {
x.a += *x.b;
x.b = 0;
int *c, *d;
};
-// CHECK: define %struct.medium @f_medium(%struct.medium* %x)
+// CHECK-LABEL: define %struct.medium @f_medium(%struct.medium* %x)
struct medium f_medium(struct medium x) {
x.a += *x.b;
x.b = 0;
int x;
};
-// CHECK: define void @f_large(%struct.large* noalias sret %agg.result, %struct.large* %x)
+// CHECK-LABEL: define void @f_large(%struct.large* noalias sret %agg.result, %struct.large* %x)
struct large f_large(struct large x) {
x.a += *x.b;
x.b = 0;
int a, b;
};
-// CHECK: define i64 @f_reg(i64 %x.coerce)
+// CHECK-LABEL: define i64 @f_reg(i64 %x.coerce)
struct reg f_reg(struct reg x) {
x.a += x.b;
return x;
float b;
};
-// CHECK: define inreg %struct.mixed @f_mixed(i32 inreg %x.coerce0, float inreg %x.coerce1)
+// CHECK-LABEL: define inreg %struct.mixed @f_mixed(i32 inreg %x.coerce0, float inreg %x.coerce1)
struct mixed f_mixed(struct mixed x) {
x.a += 1;
return x;
char a;
};
-// CHECK: define i64 @f_tiny(i64 %x.coerce)
+// CHECK-LABEL: define i64 @f_tiny(i64 %x.coerce)
// CHECK: %[[HB:[^ ]+]] = lshr i64 %x.coerce, 56
// CHECK: = trunc i64 %[[HB]] to i8
struct tiny f_tiny(struct tiny x) {
return x;
}
-// CHECK: define void @call_tiny()
+// CHECK-LABEL: define void @call_tiny()
// CHECK: %[[XV:[^ ]+]] = zext i8 %{{[^ ]+}} to i64
// CHECK: %[[HB:[^ ]+]] = shl i64 %[[XV]], 56
// CHECK: = call i64 @f_tiny(i64 %[[HB]])
f_tiny(x);
}
-// CHECK: define signext i32 @f_variable(i8* %f, ...)
+// CHECK-LABEL: define signext i32 @f_variable(i8* %f, ...)
// CHECK: %ap = alloca i8*
// CHECK: call void @llvm.va_start
//
}
void test_store_ss(__m128 x, void* y) {
- // CHECK: define void @test_store_ss
+ // CHECK-LABEL: define void @test_store_ss
// CHECK: store {{.*}} float* {{.*}}, align 1,
_mm_store_ss(y, x);
}
}
void test_store_sd(__m128d x, void* y) {
- // CHECK: define void @test_store_sd
+ // CHECK-LABEL: define void @test_store_sd
// CHECK: store {{.*}} double* {{.*}}, align 1{{$}}
_mm_store_sd(y, x);
}
void test_store1_pd(__m128d x, void* y) {
- // CHECK: define void @test_store1_pd
+ // CHECK-LABEL: define void @test_store1_pd
// CHECK: store {{.*}} double* {{.*}}, align 1{{$}}
// CHECK: store {{.*}} double* {{.*}}, align 1{{$}}
_mm_store1_pd(y, x);
}
void test_storer_pd(__m128d x, void* y) {
- // CHECK: define void @test_storer_pd
+ // CHECK-LABEL: define void @test_storer_pd
// CHECK: store {{.*}} <2 x double>* {{.*}}, align 16{{$}}
_mm_storer_pd(y, x);
}
void test_storeh_pd(__m128d x, void* y) {
- // CHECK: define void @test_storeh_pd
+ // CHECK-LABEL: define void @test_storeh_pd
// CHECK: store {{.*}} double* {{.*}}, align 1{{$}}
_mm_storeh_pd(y, x);
}
void test_storel_pd(__m128d x, void* y) {
- // CHECK: define void @test_storel_pd
+ // CHECK-LABEL: define void @test_storel_pd
// CHECK: store {{.*}} double* {{.*}}, align 1{{$}}
_mm_storel_pd(y, x);
}
}
void test_storel_epi64(__m128i x, void* y) {
- // CHECK: define void @test_storel_epi64
+ // CHECK-LABEL: define void @test_storel_epi64
// CHECK: store {{.*}} i64* {{.*}}, align 1{{$}}
_mm_storel_epi64(y, x);
}
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
// CHECK: ModuleID
// CHECK-NOT: zeroinitializer
-// CHECK: define i8* @f
+// CHECK-LABEL: define i8* @f
struct s {
int a;
void __attribute__((stdcall)) f2(void);
void __attribute__((thiscall)) f3(void);
void __attribute__((fastcall)) f4(void) {
-// CHECK: define x86_fastcallcc void @f4()
+// CHECK-LABEL: define x86_fastcallcc void @f4()
f1();
// CHECK: call x86_fastcallcc void @f1()
}
void __attribute__((stdcall)) f5(void) {
-// CHECK: define x86_stdcallcc void @f5()
+// CHECK-LABEL: define x86_stdcallcc void @f5()
f2();
// CHECK: call x86_stdcallcc void @f2()
}
void __attribute__((thiscall)) f6(void) {
-// CHECK: define x86_thiscallcc void @f6()
+// CHECK-LABEL: define x86_thiscallcc void @f6()
f3();
// CHECK: call x86_thiscallcc void @f3()
}
void __attribute__((fastcall)) foo1(int y);
void bar1(int y) {
- // CHECK: define void @bar1
+ // CHECK-LABEL: define void @bar1
// CHECK: call x86_fastcallcc void @foo1(i32 inreg %
foo1(y);
}
};
void __attribute__((fastcall)) foo2(struct S1 y);
void bar2(struct S1 y) {
- // CHECK: define void @bar2
+ // CHECK-LABEL: define void @bar2
// CHECK: call x86_fastcallcc void @foo2(i32 inreg undef, i32 %
foo2(y);
}
void __attribute__((fastcall)) foo3(int *y);
void bar3(int *y) {
- // CHECK: define void @bar3
+ // CHECK-LABEL: define void @bar3
// CHECK: call x86_fastcallcc void @foo3(i32* inreg %
foo3(y);
}
enum Enum {Eval};
void __attribute__((fastcall)) foo4(enum Enum y);
void bar4(enum Enum y) {
- // CHECK: define void @bar4
+ // CHECK-LABEL: define void @bar4
// CHECK: call x86_fastcallcc void @foo4(i32 inreg %
foo4(y);
}
};
void __attribute__((fastcall)) foo5(struct S2 y);
void bar5(struct S2 y) {
- // CHECK: define void @bar5
+ // CHECK-LABEL: define void @bar5
// CHECK: call x86_fastcallcc void @foo5(%struct.S2* byval align 4 %
foo5(y);
}
void __attribute__((fastcall)) foo6(long long y);
void bar6(long long y) {
- // CHECK: define void @bar6
+ // CHECK-LABEL: define void @bar6
// CHECK: call x86_fastcallcc void @foo6(i64 %
foo6(y);
}
void __attribute__((fastcall)) foo7(int a, struct S1 b, int c);
void bar7(int a, struct S1 b, int c) {
- // CHECK: define void @bar7
+ // CHECK-LABEL: define void @bar7
// CHECK: call x86_fastcallcc void @foo7(i32 inreg %{{.*}}, i32 %{{.*}}, i32 %{{.*}}
foo7(a, b, c);
}
void __attribute__((fastcall)) foo8(struct S1 a, int b);
void bar8(struct S1 a, int b) {
- // CHECK: define void @bar8
+ // CHECK-LABEL: define void @bar8
// CHECK: call x86_fastcallcc void @foo8(i32 inreg undef, i32 %{{.*}}, i32 inreg %
foo8(a, b);
}
void __attribute__((fastcall)) foo9(struct S2 a, int b);
void bar9(struct S2 a, int b) {
- // CHECK: define void @bar9
+ // CHECK-LABEL: define void @bar9
// CHECK: call x86_fastcallcc void @foo9(%struct.S2* byval align 4 %{{.*}}, i32 %
foo9(a, b);
}
void __attribute__((fastcall)) foo10(float y, int x);
void bar10(float y, int x) {
- // CHECK: define void @bar10
+ // CHECK-LABEL: define void @bar10
// CHECK: call x86_fastcallcc void @foo10(float %{{.*}}, i32 inreg %
foo10(y, x);
}
void __attribute__((fastcall)) foo11(double y, int x);
void bar11(double y, int x) {
- // CHECK: define void @bar11
+ // CHECK-LABEL: define void @bar11
// CHECK: call x86_fastcallcc void @foo11(double %{{.*}}, i32 inreg %
foo11(y, x);
}
};
void __attribute__((fastcall)) foo12(struct S3 y, int x);
void bar12(struct S3 y, int x) {
- // CHECK: define void @bar12
+ // CHECK-LABEL: define void @bar12
// CHECK: call x86_fastcallcc void @foo12(float %{{.*}}, i32 inreg %
foo12(y, x);
}
return j;
}
-// CHECK: define i32 @foo4t()
+// CHECK-LABEL: define i32 @foo4t()
// CHECK: ret i32 376
// CHECK: }
int foo4t() {
return foo4(111) + foo4(99) + foo4(222) + foo4(601);
}
-// CHECK: define void @foo5()
+// CHECK-LABEL: define void @foo5()
// CHECK-NOT: switch
// CHECK: }
void foo5(){
}
}
-// CHECK: define void @foo6()
+// CHECK-LABEL: define void @foo6()
// CHECK-NOT: switch
// CHECK: }
void foo6(){
}
}
-// CHECK: define void @foo7()
+// CHECK-LABEL: define void @foo7()
// CHECK-NOT: switch
// CHECK: }
void foo7(){
}
-// CHECK: define i32 @f8(
+// CHECK-LABEL: define i32 @f8(
// CHECK: ret i32 3
// CHECK: }
int f8(unsigned x) {
// Ensure that default after a case range is not ignored.
//
-// CHECK: define i32 @f9()
+// CHECK-LABEL: define i32 @f9()
// CHECK: ret i32 10
// CHECK: }
static int f9_0(unsigned x) {
// miscompilation of fallthrough from default to a (tested) case
// range.
//
-// CHECK: define i32 @f10()
+// CHECK-LABEL: define i32 @f10()
// CHECK: ret i32 10
// CHECK: }
static int f10_0(unsigned x) {
// This generated incorrect code because of poor switch chaining.
//
-// CHECK: define i32 @f11(
+// CHECK-LABEL: define i32 @f11(
// CHECK: ret i32 3
// CHECK: }
int f11(int x) {
// This just asserted because of the way case ranges were calculated.
//
-// CHECK: define i32 @f12(
+// CHECK-LABEL: define i32 @f12(
// CHECK: ret i32 3
// CHECK: }
int f12(int x) {
// Make sure return is not constant (if empty range is skipped or miscompiled)
//
-// CHECK: define i32 @f13(
+// CHECK-LABEL: define i32 @f13(
// CHECK: ret i32 %
// CHECK: }
int f13(unsigned x) {
void test_store_m(unsigned int i) {
asm("st %1, %0" : "=m" (gi) : "r" (i));
-// CHECK: define void @test_store_m(i32 zeroext %i)
+// CHECK-LABEL: define void @test_store_m(i32 zeroext %i)
// CHECK: call void asm "st $1, $0", "=*m,r"(i32* @gi, i32 %i)
}
void test_store_Q(unsigned int i) {
asm("st %1, %0" : "=Q" (gi) : "r" (i));
-// CHECK: define void @test_store_Q(i32 zeroext %i)
+// CHECK-LABEL: define void @test_store_Q(i32 zeroext %i)
// CHECK: call void asm "st $1, $0", "=*Q,r"(i32* @gi, i32 %i)
}
void test_store_R(unsigned int i) {
asm("st %1, %0" : "=R" (gi) : "r" (i));
-// CHECK: define void @test_store_R(i32 zeroext %i)
+// CHECK-LABEL: define void @test_store_R(i32 zeroext %i)
// CHECK: call void asm "st $1, $0", "=*R,r"(i32* @gi, i32 %i)
}
void test_store_S(unsigned int i) {
asm("st %1, %0" : "=S" (gi) : "r" (i));
-// CHECK: define void @test_store_S(i32 zeroext %i)
+// CHECK-LABEL: define void @test_store_S(i32 zeroext %i)
// CHECK: call void asm "st $1, $0", "=*S,r"(i32* @gi, i32 %i)
}
void test_store_T(unsigned int i) {
asm("st %1, %0" : "=T" (gi) : "r" (i));
-// CHECK: define void @test_store_T(i32 zeroext %i)
+// CHECK-LABEL: define void @test_store_T(i32 zeroext %i)
// CHECK: call void asm "st $1, $0", "=*T,r"(i32* @gi, i32 %i)
}
unsigned int i;
asm("l %0, %1" : "=r" (i) : "m" (gi));
return i;
-// CHECK: define signext i32 @test_load_m()
+// CHECK-LABEL: define signext i32 @test_load_m()
// CHECK: call i32 asm "l $0, $1", "=r,*m"(i32* @gi)
}
unsigned int i;
asm("l %0, %1" : "=r" (i) : "Q" (gi));
return i;
-// CHECK: define signext i32 @test_load_Q()
+// CHECK-LABEL: define signext i32 @test_load_Q()
// CHECK: call i32 asm "l $0, $1", "=r,*Q"(i32* @gi)
}
unsigned int i;
asm("l %0, %1" : "=r" (i) : "R" (gi));
return i;
-// CHECK: define signext i32 @test_load_R()
+// CHECK-LABEL: define signext i32 @test_load_R()
// CHECK: call i32 asm "l $0, $1", "=r,*R"(i32* @gi)
}
unsigned int i;
asm("l %0, %1" : "=r" (i) : "S" (gi));
return i;
-// CHECK: define signext i32 @test_load_S()
+// CHECK-LABEL: define signext i32 @test_load_S()
// CHECK: call i32 asm "l $0, $1", "=r,*S"(i32* @gi)
}
unsigned int i;
asm("l %0, %1" : "=r" (i) : "T" (gi));
return i;
-// CHECK: define signext i32 @test_load_T()
+// CHECK-LABEL: define signext i32 @test_load_T()
// CHECK: call i32 asm "l $0, $1", "=r,*T"(i32* @gi)
}
void test_mI(unsigned char *c) {
asm volatile("cli %0, %1" :: "Q" (*c), "I" (100));
-// CHECK: define void @test_mI(i8* %c)
+// CHECK-LABEL: define void @test_mI(i8* %c)
// CHECK: call void asm sideeffect "cli $0, $1", "*Q,I"(i8* %c, i32 100)
}
unsigned int test_dJa(unsigned int i, unsigned int j) {
asm("sll %0, %2(%3)" : "=d" (i) : "0" (i), "J" (1000), "a" (j));
return i;
-// CHECK: define zeroext i32 @test_dJa(i32 zeroext %i, i32 zeroext %j)
+// CHECK-LABEL: define zeroext i32 @test_dJa(i32 zeroext %i, i32 zeroext %j)
// CHECK: call i32 asm "sll $0, $2($3)", "=d,0,J,a"(i32 %i, i32 1000, i32 %j)
}
unsigned long test_rK(unsigned long i) {
asm("aghi %0, %2" : "=r" (i) : "0" (i), "K" (-30000));
return i;
-// CHECK: define i64 @test_rK(i64 %i)
+// CHECK-LABEL: define i64 @test_rK(i64 %i)
// CHECK: call i64 asm "aghi $0, $2", "=r,0,K"(i64 %i, i32 -30000)
}
unsigned long test_rL(unsigned long i) {
asm("sllg %0, %1, %2" : "=r" (i) : "r" (i), "L" (500000));
return i;
-// CHECK: define i64 @test_rL(i64 %i)
+// CHECK-LABEL: define i64 @test_rL(i64 %i)
// CHECK: call i64 asm "sllg $0, $1, $2", "=r,r,L"(i64 %i, i32 500000)
}
void test_M() {
asm volatile("#FOO %0" :: "M"(0x7fffffff));
-// CHECK: define void @test_M()
+// CHECK-LABEL: define void @test_M()
// CHECK: call void asm sideeffect "#FOO $0", "M"(i32 2147483647)
}
float test_f32(float f, float g) {
asm("aebr %0, %2" : "=f" (f) : "0" (f), "f" (g));
return f;
-// CHECK: define float @test_f32(float %f, float %g)
+// CHECK-LABEL: define float @test_f32(float %f, float %g)
// CHECK: call float asm "aebr $0, $2", "=f,0,f"(float %f, float %g)
}
double test_f64(double f, double g) {
asm("adbr %0, %2" : "=f" (f) : "0" (f), "f" (g));
return f;
-// CHECK: define double @test_f64(double %f, double %g)
+// CHECK-LABEL: define double @test_f64(double %f, double %g)
// CHECK: call double asm "adbr $0, $2", "=f,0,f"(double %f, double %g)
}
void f0(transp_t0 obj);
-// CHECK: define void @f1_0(i32* %a0)
+// CHECK-LABEL: define void @f1_0(i32* %a0)
// CHECK: call void @f0(%union.transp_t0* byval align 4 %{{.*}})
// CHECK: call void %{{.*}}(i8* %{{[a-z0-9]*}})
// CHECK: }
unsigned int ui, uj, uk;
int i, j, k;
-// CHECK: define void @test0()
+// CHECK-LABEL: define void @test0()
void test0() {
// -ftrapv doesn't affect unsigned arithmetic.
// CHECK: [[T1:%.*]] = load i32* @uj
i = j + k;
}
-// CHECK: define void @test1()
+// CHECK-LABEL: define void @test1()
void test1() {
extern void opaque(int);
opaque(i++);
// CHECK: call void @llvm.trap()
}
-// CHECK: define void @test2()
+// CHECK-LABEL: define void @test2()
void test2() {
extern void opaque(int);
opaque(++i);
// CHECK: call void @llvm.trap()
}
-// CHECK: define void @test3(
+// CHECK-LABEL: define void @test3(
void test3(int a, int b, float c, float d) {
// CHECK-NOT: @llvm.trap
(void)(a / b);
extern void opaquelong(unsigned long);
extern void opaqueint(unsigned int);
-// CHECK: define void @testlongadd()
+// CHECK-LABEL: define void @testlongadd()
void testlongadd() {
// CHECK: [[T1:%.*]] = load i64* @lj
li = lj + lk;
}
-// CHECK: define void @testlongsub()
+// CHECK-LABEL: define void @testlongsub()
void testlongsub() {
// CHECK: [[T1:%.*]] = load i64* @lj
li = lj - lk;
}
-// CHECK: define void @testlongmul()
+// CHECK-LABEL: define void @testlongmul()
void testlongmul() {
// CHECK: [[T1:%.*]] = load i64* @lj
li = lj * lk;
}
-// CHECK: define void @testlongpostinc()
+// CHECK-LABEL: define void @testlongpostinc()
void testlongpostinc() {
opaquelong(li++);
// CHECK: call void @__ubsan_handle_add_overflow
}
-// CHECK: define void @testlongpreinc()
+// CHECK-LABEL: define void @testlongpreinc()
void testlongpreinc() {
opaquelong(++li);
// CHECK: call void @__ubsan_handle_add_overflow
}
-// CHECK: define void @testintadd()
+// CHECK-LABEL: define void @testintadd()
void testintadd() {
// CHECK: [[T1:%.*]] = load i32* @ij
ii = ij + ik;
}
-// CHECK: define void @testintsub()
+// CHECK-LABEL: define void @testintsub()
void testintsub() {
// CHECK: [[T1:%.*]] = load i32* @ij
ii = ij - ik;
}
-// CHECK: define void @testintmul()
+// CHECK-LABEL: define void @testintmul()
void testintmul() {
// CHECK: [[T1:%.*]] = load i32* @ij
ii = ij * ik;
}
-// CHECK: define void @testintpostinc()
+// CHECK-LABEL: define void @testintpostinc()
void testintpostinc() {
opaqueint(ii++);
// CHECK: call void @__ubsan_handle_add_overflow
}
-// CHECK: define void @testintpreinc()
+// CHECK-LABEL: define void @testintpreinc()
void testintpreinc() {
opaqueint(++ii);
extern void opaqueshort(unsigned short);
extern void opaquechar(unsigned char);
-// CHECKS: define void @testshortadd()
-// CHECKU: define void @testshortadd()
+// CHECKS-LABEL: define void @testshortadd()
+// CHECKU-LABEL: define void @testshortadd()
void testshortadd() {
// CHECKS: load i16* @sj
// CHECKS: load i16* @sk
si = sj + sk;
}
-// CHECKS: define void @testshortsub()
-// CHECKU: define void @testshortsub()
+// CHECKS-LABEL: define void @testshortsub()
+// CHECKU-LABEL: define void @testshortsub()
void testshortsub() {
// CHECKS: load i16* @sj
si = sj - sk;
}
-// CHECKS: define void @testshortmul()
-// CHECKU: define void @testshortmul()
+// CHECKS-LABEL: define void @testshortmul()
+// CHECKU-LABEL: define void @testshortmul()
void testshortmul() {
// CHECKS: load i16* @sj
si = sj * sk;
}
-// CHECKS: define void @testcharadd()
-// CHECKU: define void @testcharadd()
+// CHECKS-LABEL: define void @testcharadd()
+// CHECKU-LABEL: define void @testcharadd()
void testcharadd() {
// CHECKS: load i8* @cj
ci = cj + ck;
}
-// CHECKS: define void @testcharsub()
-// CHECKU: define void @testcharsub()
+// CHECKS-LABEL: define void @testcharsub()
+// CHECKU-LABEL: define void @testcharsub()
void testcharsub() {
// CHECKS: load i8* @cj
ci = cj - ck;
}
-// CHECKS: define void @testcharmul()
-// CHECKU: define void @testcharmul()
+// CHECKS-LABEL: define void @testcharmul()
+// CHECKU-LABEL: define void @testcharmul()
void testcharmul() {
// CHECKS: load i8* @cj
// CHECK-PROTECTED: @test4 = hidden global i32 10
// CHECK-HIDDEN: @test4 = hidden global i32 10
-// CHECK-DEFAULT: define i32 @f_def()
+// CHECK-DEFAULT-LABEL: define i32 @f_def()
// CHECK-DEFAULT: declare void @f_ext()
-// CHECK-DEFAULT: define internal void @f_deferred()
-// CHECK-PROTECTED: define protected i32 @f_def()
+// CHECK-DEFAULT-LABEL: define internal void @f_deferred()
+// CHECK-PROTECTED-LABEL: define protected i32 @f_def()
// CHECK-PROTECTED: declare void @f_ext()
-// CHECK-PROTECTED: define internal void @f_deferred()
-// CHECK-HIDDEN: define hidden i32 @f_def()
+// CHECK-PROTECTED-LABEL: define internal void @f_deferred()
+// CHECK-HIDDEN-LABEL: define hidden i32 @f_def()
// CHECK-HIDDEN: declare void @f_ext()
-// CHECK-HIDDEN: define internal void @f_deferred()
+// CHECK-HIDDEN-LABEL: define internal void @f_deferred()
extern void f_ext(void);
}
// PR8457
-// CHECK-DEFAULT: define void @test1(
-// CHECK-PROTECTED: define void @test1(
-// CHECK-HIDDEN: define void @test1(
+// CHECK-DEFAULT-LABEL: define void @test1(
+// CHECK-PROTECTED-LABEL: define void @test1(
+// CHECK-HIDDEN-LABEL: define void @test1(
struct Test1 { int field; };
void __attribute__((visibility("default"))) test1(struct Test1 *v) { }
// rdar://problem/8595231
-// CHECK-DEFAULT: define void @test2()
-// CHECK-PROTECTED: define void @test2()
-// CHECK-HIDDEN: define void @test2()
+// CHECK-DEFAULT-LABEL: define void @test2()
+// CHECK-PROTECTED-LABEL: define void @test2()
+// CHECK-HIDDEN-LABEL: define void @test2()
void test2(void);
void __attribute__((visibility("default"))) test2(void) {}
-// CHECK-DEFAULT: define hidden void @test3()
-// CHECK-PROTECTED: define hidden void @test3()
-// CHECK-HIDDEN: define hidden void @test3()
+// CHECK-DEFAULT-LABEL: define hidden void @test3()
+// CHECK-PROTECTED-LABEL: define hidden void @test3()
+// CHECK-HIDDEN-LABEL: define hidden void @test3()
extern void test3(void);
__private_extern__ void test3(void) {}
__private_extern__ int test4 = 10;
// rdar://12399248
-// CHECK-DEFAULT: define hidden void @test5()
-// CHECK-PROTECTED: define hidden void @test5()
-// CHECK-HIDDEN: define hidden void @test5()
+// CHECK-DEFAULT-LABEL: define hidden void @test5()
+// CHECK-PROTECTED-LABEL: define hidden void @test5()
+// CHECK-HIDDEN-LABEL: define hidden void @test5()
__attribute__((availability(macosx,introduced=10.5,deprecated=10.6)))
__private_extern__ void test5(void) {}
}
// rdar://8403108
-// CHECK: define void @f_8403108
+// CHECK-LABEL: define void @f_8403108
void f_8403108(unsigned x) {
// CHECK: call i8* @llvm.stacksave()
char s1[x];
}
// http://llvm.org/PR8567
-// CHECK: define double @test_PR8567
+// CHECK-LABEL: define double @test_PR8567
double test_PR8567(int n, double (*p)[n][5]) {
// CHECK: [[NV:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[PV:%.*]] = alloca [5 x double]*, align 4
}
int test4(unsigned n, char (*p)[n][n+1][6]) {
- // CHECK: define i32 @test4(
+ // CHECK-LABEL: define i32 @test4(
// CHECK: [[N:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[P:%.*]] = alloca [6 x i8]*, align 4
// CHECK-NEXT: [[P2:%.*]] = alloca [6 x i8]*, align 4
// rdar://11485774
void test5(void)
{
- // CHECK: define void @test5(
+ // CHECK-LABEL: define void @test5(
int a[5], i = 0;
// CHECK: [[A:%.*]] = alloca [5 x i32], align 4
// CHECK-NEXT: [[I:%.*]] = alloca i32, align 4
void test6(void)
{
- // CHECK: define void @test6(
+ // CHECK-LABEL: define void @test6(
int n = 20, **a, i=0;
// CHECK: [[N:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[A:%.*]] = alloca i32**, align 4
// Follow gcc's behavior for VLAs in parameter lists. PR9559.
void test7(int a[b(0)]) {
- // CHECK: define void @test7(
+ // CHECK-LABEL: define void @test7(
// CHECK: call i32 @b(i8* null)
}
// that do implicit lvalue-to-rvalue conversion are substantially
// reduced.
-// CHECK: define void @test()
+// CHECK-LABEL: define void @test()
void test() {
// CHECK: load volatile [[INT]]* @i
i;
}
extern volatile enum X x;
-// CHECK: define void @test1()
+// CHECK-LABEL: define void @test1()
void test1() {
extern void test1_helper(void);
test1_helper();
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
void test0() {
- // CHECK: define void @test0()
+ // CHECK-LABEL: define void @test0()
// CHECK: [[F:%.*]] = alloca float
// CHECK-NEXT: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @test0_v, i32 0, i32 0), align 4
// CHECK-NEXT: load volatile float* getelementptr inbounds ({{.*}} @test0_v, i32 0, i32 1), align 4
}
void test1() {
- // CHECK: define void @test1()
+ // CHECK-LABEL: define void @test1()
// CHECK: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4
// CHECK-NEXT: [[IMAG:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4
// CHECK-NEXT: store volatile float [[REAL]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4
volatile _Complex float cf32 __attribute__((aligned(32)));
volatile _Complex double cd32 __attribute__((aligned(32)));
-// CHECK-LABEL: define void @test_cf()
+// CHECK-LABEL-LABEL: define void @test_cf()
void test_cf() {
// CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 0), align 4
// CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 1), align 4
// CHECK-NEXT: ret void
}
-// CHECK-LABEL: define void @test_cd()
+// CHECK-LABEL-LABEL: define void @test_cd()
void test_cd() {
// CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 0), align 8
// CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8
// CHECK-NEXT: ret void
}
-// CHECK-LABEL: define void @test_cf32()
+// CHECK-LABEL-LABEL: define void @test_cf32()
void test_cf32() {
// CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 0), align 32
// CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 1), align 4
// CHECK-NEXT: ret void
}
-// CHECK-LABEL: define void @test_cd32()
+// CHECK-LABEL-LABEL: define void @test_cd32()
void test_cd32() {
// CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 0), align 32
// CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 1), align 8
// RUN: %clang_cc1 -w -fblocks -triple i386-apple-darwin9 -target-cpu yonah -emit-llvm -o - %s | FileCheck %s
-// CHECK: define signext i8 @f0()
+// CHECK-LABEL: define signext i8 @f0()
char f0(void) {
return 0;
}
-// CHECK: define signext i16 @f1()
+// CHECK-LABEL: define signext i16 @f1()
short f1(void) {
return 0;
}
-// CHECK: define i32 @f2()
+// CHECK-LABEL: define i32 @f2()
int f2(void) {
return 0;
}
-// CHECK: define float @f3()
+// CHECK-LABEL: define float @f3()
float f3(void) {
return 0;
}
-// CHECK: define double @f4()
+// CHECK-LABEL: define double @f4()
double f4(void) {
return 0;
}
-// CHECK: define x86_fp80 @f5()
+// CHECK-LABEL: define x86_fp80 @f5()
long double f5(void) {
return 0;
}
-// CHECK: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4)
+// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4)
void f6(char a0, short a1, int a2, long long a3, void *a4) {}
-// CHECK: define void @f7(i32 %a0)
+// CHECK-LABEL: define void @f7(i32 %a0)
typedef enum { A, B, C } e7;
void f7(e7 a0) {}
-// CHECK: define i64 @f8_1()
-// CHECK: define void @f8_2(i32 %a0.0, i32 %a0.1)
+// CHECK-LABEL: define i64 @f8_1()
+// CHECK-LABEL: define void @f8_2(i32 %a0.0, i32 %a0.1)
struct s8 {
int a;
int b;
// This should be passed just as s8.
-// CHECK: define i64 @f9_1()
+// CHECK-LABEL: define i64 @f9_1()
// FIXME: llvm-gcc expands this, this may have some value for the
// backend in terms of optimization but doesn't change the ABI.
-// CHECK: define void @f9_2(%struct.s9* byval align 4 %a0)
+// CHECK-LABEL: define void @f9_2(%struct.s9* byval align 4 %a0)
struct s9 {
int a : 17;
int b;
// CHECK: void @f28(%struct.s28* noalias sret %agg.result)
struct s28 { int a; int b[]; } f28(void) { while (1) {} }
-// CHECK: define i16 @f29()
+// CHECK-LABEL: define i16 @f29()
struct s29 { struct { } a[1]; char b; char c; } f29(void) { while (1) {} }
-// CHECK: define i16 @f30()
+// CHECK-LABEL: define i16 @f30()
struct s30 { char a; char b : 4; } f30(void) { while (1) {} }
-// CHECK: define float @f31()
+// CHECK-LABEL: define float @f31()
struct s31 { char : 0; float b; char : 0; } f31(void) { while (1) {} }
-// CHECK: define i32 @f32()
+// CHECK-LABEL: define i32 @f32()
struct s32 { char a; unsigned : 0; } f32(void) { while (1) {} }
-// CHECK: define float @f33()
+// CHECK-LABEL: define float @f33()
struct s33 { float a; long long : 0; } f33(void) { while (1) {} }
-// CHECK: define float @f34()
+// CHECK-LABEL: define float @f34()
struct s34 { struct { int : 0; } a; float b; } f34(void) { while (1) {} }
-// CHECK: define i16 @f35()
+// CHECK-LABEL: define i16 @f35()
struct s35 { struct { int : 0; } a; char b; char c; } f35(void) { while (1) {} }
-// CHECK: define i16 @f36()
+// CHECK-LABEL: define i16 @f36()
struct s36 { struct { int : 0; } a[2][10]; char b; char c; } f36(void) { while (1) {} }
-// CHECK: define float @f37()
+// CHECK-LABEL: define float @f37()
struct s37 { float c[1][1]; } f37(void) { while (1) {} }
-// CHECK: define void @f38(%struct.s38* noalias sret %agg.result)
+// CHECK-LABEL: define void @f38(%struct.s38* noalias sret %agg.result)
struct s38 { char a[3]; short b; } f38(void) { while (1) {} }
-// CHECK: define void @f39(%struct.s39* byval align 16 %x)
+// CHECK-LABEL: define void @f39(%struct.s39* byval align 16 %x)
typedef int v39 __attribute((vector_size(16)));
struct s39 { v39 x; };
void f39(struct s39 x) {}
// <rdar://problem/7247671>
-// CHECK: define i32 @f40()
+// CHECK-LABEL: define i32 @f40()
enum e40 { ec0 = 0 };
enum e40 f40(void) { }
-// CHECK: define void ()* @f41()
+// CHECK-LABEL: define void ()* @f41()
typedef void (^vvbp)(void);
vvbp f41(void) { }
-// CHECK: define i32 @f42()
+// CHECK-LABEL: define i32 @f42()
struct s42 { enum e40 f0; } f42(void) { }
-// CHECK: define i64 @f43()
+// CHECK-LABEL: define i64 @f43()
struct s43 { enum e40 f0; int f1; } f43(void) { }
-// CHECK: define void ()* @f44()
+// CHECK-LABEL: define void ()* @f44()
struct s44 { vvbp f0; } f44(void) { }
-// CHECK: define i64 @f45()
+// CHECK-LABEL: define i64 @f45()
struct s45 { vvbp f0; int f1; } f45(void) { }
-// CHECK: define void @f46(i32 %a0)
+// CHECK-LABEL: define void @f46(i32 %a0)
void f46(enum e40 a0) { }
-// CHECK: define void @f47(void ()* %a1)
+// CHECK-LABEL: define void @f47(void ()* %a1)
void f47(vvbp a1) { }
-// CHECK: define void @f48(i32 %a0.0)
+// CHECK-LABEL: define void @f48(i32 %a0.0)
struct s48 { enum e40 f0; };
void f48(struct s48 a0) { }
-// CHECK: define void @f49(i32 %a0.0, i32 %a0.1)
+// CHECK-LABEL: define void @f49(i32 %a0.0, i32 %a0.1)
struct s49 { enum e40 f0; int f1; };
void f49(struct s49 a0) { }
-// CHECK: define void @f50(void ()* %a0.0)
+// CHECK-LABEL: define void @f50(void ()* %a0.0)
struct s50 { vvbp f0; };
void f50(struct s50 a0) { }
-// CHECK: define void @f51(void ()* %a0.0, i32 %a0.1)
+// CHECK-LABEL: define void @f51(void ()* %a0.0, i32 %a0.1)
struct s51 { vvbp f0; int f1; };
void f51(struct s51 a0) { }
-// CHECK: define void @f52(%struct.s52* byval align 4)
+// CHECK-LABEL: define void @f52(%struct.s52* byval align 4)
struct s52 {
long double a;
};
void f52(struct s52 x) {}
-// CHECK: define void @f53(%struct.s53* byval align 4)
+// CHECK-LABEL: define void @f53(%struct.s53* byval align 4)
struct __attribute__((aligned(32))) s53 {
int x;
int y;
typedef unsigned short v2i16 __attribute__((__vector_size__(4)));
-// CHECK: define i32 @f54(i32 %arg.coerce)
+// CHECK-LABEL: define i32 @f54(i32 %arg.coerce)
// rdar://8359483
v2i16 f54(v2i16 arg) { return arg+arg; }
typedef int v4i32 __attribute__((__vector_size__(16)));
-// CHECK: define <2 x i64> @f55(<4 x i32> %arg)
+// CHECK-LABEL: define <2 x i64> @f55(<4 x i32> %arg)
// PR8029
v4i32 f55(v4i32 arg) { return arg+arg; }
-// CHECK: define void @f56(
+// CHECK-LABEL: define void @f56(
// CHECK: i8 signext %a0, %struct.s56_0* byval align 4 %a1,
// CHECK: i64 %a2.coerce, %struct.s56_1* byval align 4,
// CHECK: i64 %a4.coerce, %struct.s56_2* byval align 4,
a10, a11, a12, a13);
}
-// CHECK: define void @f57(i32 %x.0, i32 %x.1)
+// CHECK-LABEL: define void @f57(i32 %x.0, i32 %x.1)
// CHECK: call void @f57(
struct s57 { _Complex int x; };
void f57(struct s57 x) {} void f57a(void) { f57((struct s57){1}); }
-// CHECK: define void @f58()
+// CHECK-LABEL: define void @f58()
union u58 {};
void f58(union u58 x) {}
-// CHECK: define i64 @f59()
+// CHECK-LABEL: define i64 @f59()
struct s59 { float x __attribute((aligned(8))); };
struct s59 f59() { while (1) {} }
-// CHECK: define void @f60(%struct.s60* byval align 4, i32 %y)
+// CHECK-LABEL: define void @f60(%struct.s60* byval align 4, i32 %y)
struct s60 { int x __attribute((aligned(8))); };
void f60(struct s60 x, int y) {}
-// CHECK: define void @f61(i32 %x, %struct.s61* byval align 16 %y)
+// CHECK-LABEL: define void @f61(i32 %x, %struct.s61* byval align 16 %y)
typedef int T61 __attribute((vector_size(16)));
struct s61 { T61 x; int y; };
void f61(int x, struct s61 y) {}
-// CHECK: define void @f62(i32 %x, %struct.s62* byval align 4)
+// CHECK-LABEL: define void @f62(i32 %x, %struct.s62* byval align 4)
typedef int T62 __attribute((vector_size(16)));
struct s62 { T62 x; int y; } __attribute((packed, aligned(8)));
void f62(int x, struct s62 y) {}
-// CHECK: define i32 @f63
+// CHECK-LABEL: define i32 @f63
// CHECK: ptrtoint
// CHECK: and {{.*}}, -16
// CHECK: inttoptr
return s.y;
}
-// CHECK: define void @f64(%struct.s64* byval align 4 %x)
+// CHECK-LABEL: define void @f64(%struct.s64* byval align 4 %x)
struct s64 { signed char a[0]; signed char b[]; };
void f64(struct s64 x) {}
-// CHECK: define float @f65()
+// CHECK-LABEL: define float @f65()
struct s65 { signed char a[0]; float b; };
struct s65 f65() { return (struct s65){{},2}; }
-// CHECK: define <2 x i64> @f66
+// CHECK-LABEL: define <2 x i64> @f66
// CHECK: ptrtoint
// CHECK: and {{.*}}, -16
// CHECK: inttoptr
// PR14453
struct s67 { _Complex unsigned short int a; };
void f67(struct s67 x) {}
-// CHECK: define void @f67(%struct.s67* byval align 4 %x)
+// CHECK-LABEL: define void @f67(%struct.s67* byval align 4 %x)
// RUN: %clang_cc1 -w -fblocks -triple i386-pc-linux-gnu -target-cpu pentium4 -emit-llvm -o %t %s
// RUN: FileCheck < %t %s
-// CHECK: define void @f56(
+// CHECK-LABEL: define void @f56(
// CHECK: i8 signext %a0, %struct.s56_0* byval align 4 %a1,
// CHECK: i64 %a2.coerce, %struct.s56_1* byval align 4,
// CHECK: <1 x double> %a4, %struct.s56_2* byval align 4,
// no-mmx should put mmx into memory
typedef int __attribute__((vector_size (8))) i32v2;
int a(i32v2 x) { return x[0]; }
-// CHECK: define i32 @a(i64 %x.coerce)
+// CHECK-LABEL: define i32 @a(i64 %x.coerce)
// but SSE2 vectors should still go into an SSE2 register
typedef int __attribute__((vector_size (16))) i32v4;
int b(i32v4 x) { return x[0]; }
-// CHECK: define i32 @b(<4 x i32> %x)
+// CHECK-LABEL: define i32 @b(<4 x i32> %x)
// RUN: %clang_cc1 -w -fblocks -triple i386-apple-darwin9 -emit-llvm -o %t %s
// RUN: FileCheck < %t %s
-// CHECK: define void @f0(%struct.s0* byval align 4)
+// CHECK-LABEL: define void @f0(%struct.s0* byval align 4)
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %{{.*}}, i8* %{{.*}}, i32 16, i32 4, i1 false)
// CHECK: }
struct s0 { long double a; };
// RUN: %clang_cc1 -w -triple i386-pc-win32 -emit-llvm -o - %s | FileCheck %s
-// CHECK: define i64 @f1_1()
-// CHECK: define void @f1_2(%struct.s1* byval align 4 %a0)
+// CHECK-LABEL: define i64 @f1_1()
+// CHECK-LABEL: define void @f1_2(%struct.s1* byval align 4 %a0)
struct s1 {
int a;
int b;
struct s1 f1_1(void) { while (1) {} }
void f1_2(struct s1 a0) {}
-// CHECK: define i32 @f2_1()
+// CHECK-LABEL: define i32 @f2_1()
struct s2 {
short a;
short b;
};
struct s2 f2_1(void) { while (1) {} }
-// CHECK: define i16 @f3_1()
+// CHECK-LABEL: define i16 @f3_1()
struct s3 {
char a;
char b;
};
struct s3 f3_1(void) { while (1) {} }
-// CHECK: define i8 @f4_1()
+// CHECK-LABEL: define i8 @f4_1()
struct s4 {
char a:4;
char b:4;
};
struct s4 f4_1(void) { while (1) {} }
-// CHECK: define i64 @f5_1()
-// CHECK: define void @f5_2(%struct.s5* byval align 4)
+// CHECK-LABEL: define i64 @f5_1()
+// CHECK-LABEL: define void @f5_2(%struct.s5* byval align 4)
struct s5 {
double a;
};
struct s5 f5_1(void) { while (1) {} }
void f5_2(struct s5 a0) {}
-// CHECK: define i32 @f6_1()
-// CHECK: define void @f6_2(%struct.s6* byval align 4 %a0)
+// CHECK-LABEL: define i32 @f6_1()
+// CHECK-LABEL: define void @f6_2(%struct.s6* byval align 4 %a0)
struct s6 {
float a;
};
typedef struct { short s; } Short;
typedef struct { } ZeroSized;
-// CHECK: define void @returnBig
+// CHECK-LABEL: define void @returnBig
// CHECK: ret void
Big returnBig(Big x) { return x; }
-// CHECK-PCC: define void @returnSmall
+// CHECK-PCC-LABEL: define void @returnSmall
// CHECK-PCC: ret void
-// CHECK-REG: define i32 @returnSmall
+// CHECK-REG-LABEL: define i32 @returnSmall
// CHECK-REG: ret i32
Small returnSmall(Small x) { return x; }
-// CHECK-PCC: define void @returnShort
+// CHECK-PCC-LABEL: define void @returnShort
// CHECK-PCC: ret void
-// CHECK-REG: define i16 @returnShort
+// CHECK-REG-LABEL: define i16 @returnShort
// CHECK-REG: ret i16
Short returnShort(Short x) { return x; }
-// CHECK: define void @returnZero()
+// CHECK-LABEL: define void @returnZero()
// CHECK: ret void
ZeroSized returnZero(ZeroSized x) { return x; }
return result;
}
-// CHECK: define void @f1(i64 %p1.coerce0, i64 %p1.coerce1)
+// CHECK-LABEL: define void @f1(i64 %p1.coerce0, i64 %p1.coerce1)
void f1(struct PP_Var p1) { while(1) {} }
// long doubles are 64 bits on NaCl
-// CHECK: define double @f5()
+// CHECK-LABEL: define double @f5()
long double f5(void) {
return 0;
}
-// CHECK: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4)
+// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4)
void f6(char a0, short a1, int a2, long long a3, void *a4) {
}
-// CHECK: define i64 @f8_1()
-// CHECK: define void @f8_2(i64 %a0.coerce)
+// CHECK-LABEL: define i64 @f8_1()
+// CHECK-LABEL: define void @f8_2(i64 %a0.coerce)
union u8 {
long double a;
int b;
union u8 f8_1() { while (1) {} }
void f8_2(union u8 a0) {}
-// CHECK: define i64 @f9()
+// CHECK-LABEL: define i64 @f9()
struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} }
-// CHECK: define void @f10(i64 %a0.coerce)
+// CHECK-LABEL: define void @f10(i64 %a0.coerce)
struct s10 { int a; int b; int : 0; };
void f10(struct s10 a0) {}
-// CHECK: define double @f11()
+// CHECK-LABEL: define double @f11()
union { long double a; float b; } f11() { while (1) {} }
-// CHECK: define i32 @f12_0()
-// CHECK: define void @f12_1(i32 %a0.coerce)
+// CHECK-LABEL: define i32 @f12_0()
+// CHECK-LABEL: define void @f12_1(i32 %a0.coerce)
struct s12 { int a __attribute__((aligned(16))); };
struct s12 f12_0(void) { while (1) {} }
void f12_1(struct s12 a0) {}
struct s13_0 f13(int a, int b, int c, int d,
struct s13_1 e, int f) { while (1) {} }
-// CHECK: define void @f20(%struct.s20* byval align 32 %x)
+// CHECK-LABEL: define void @f20(%struct.s20* byval align 32 %x)
struct __attribute__((aligned(32))) s20 {
int x;
int y;
int a;
int b;
} s1;
-// CHECK: define i32 @f48(%struct.s1* byval %s)
+// CHECK-LABEL: define i32 @f48(%struct.s1* byval %s)
int __attribute__((pnaclcall)) f48(s1 s) { return s.a; }
-// CHECK: define void @f49(%struct.s1* noalias sret %agg.result)
+// CHECK-LABEL: define void @f49(%struct.s1* noalias sret %agg.result)
s1 __attribute__((pnaclcall)) f49() { s1 s; s.a = s.b = 1; return s; }
union simple_union {
char b;
};
// Unions should be passed as byval structs
-// CHECK: define void @f50(%union.simple_union* byval %s)
+// CHECK-LABEL: define void @f50(%union.simple_union* byval %s)
void __attribute__((pnaclcall)) f50(union simple_union s) {}
typedef struct {
int b8 : 8;
} bitfield1;
// Bitfields should be passed as byval structs
-// CHECK: define void @f51(%struct.bitfield1* byval %bf1)
+// CHECK-LABEL: define void @f51(%struct.bitfield1* byval %bf1)
void __attribute__((pnaclcall)) f51(bitfield1 bf1) {}
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx | FileCheck %s -check-prefix=AVX
#include <stdarg.h>
-// CHECK: define signext i8 @f0()
+// CHECK-LABEL: define signext i8 @f0()
char f0(void) {
return 0;
}
-// CHECK: define signext i16 @f1()
+// CHECK-LABEL: define signext i16 @f1()
short f1(void) {
return 0;
}
-// CHECK: define i32 @f2()
+// CHECK-LABEL: define i32 @f2()
int f2(void) {
return 0;
}
-// CHECK: define float @f3()
+// CHECK-LABEL: define float @f3()
float f3(void) {
return 0;
}
-// CHECK: define double @f4()
+// CHECK-LABEL: define double @f4()
double f4(void) {
return 0;
}
-// CHECK: define x86_fp80 @f5()
+// CHECK-LABEL: define x86_fp80 @f5()
long double f5(void) {
return 0;
}
-// CHECK: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4)
+// CHECK-LABEL: define void @f6(i8 signext %a0, i16 signext %a1, i32 %a2, i64 %a3, i8* %a4)
void f6(char a0, short a1, int a2, long long a3, void *a4) {
}
-// CHECK: define void @f7(i32 %a0)
+// CHECK-LABEL: define void @f7(i32 %a0)
typedef enum { A, B, C } e7;
void f7(e7 a0) {
}
// Test merging/passing of upper eightbyte with X87 class.
//
-// CHECK: define void @f8_1(%union.u8* noalias sret %agg.result)
-// CHECK: define void @f8_2(%union.u8* byval align 16 %a0)
+// CHECK-LABEL: define void @f8_1(%union.u8* noalias sret %agg.result)
+// CHECK-LABEL: define void @f8_2(%union.u8* byval align 16 %a0)
union u8 {
long double a;
int b;
union u8 f8_1() { while (1) {} }
void f8_2(union u8 a0) {}
-// CHECK: define i64 @f9()
+// CHECK-LABEL: define i64 @f9()
struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} }
-// CHECK: define void @f10(i64 %a0.coerce)
+// CHECK-LABEL: define void @f10(i64 %a0.coerce)
struct s10 { int a; int b; int : 0; };
void f10(struct s10 a0) {}
-// CHECK: define void @f11(%union.anon* noalias sret %agg.result)
+// CHECK-LABEL: define void @f11(%union.anon* noalias sret %agg.result)
union { long double a; float b; } f11() { while (1) {} }
-// CHECK: define i32 @f12_0()
-// CHECK: define void @f12_1(i32 %a0.coerce)
+// CHECK-LABEL: define i32 @f12_0()
+// CHECK-LABEL: define void @f12_1(i32 %a0.coerce)
struct s12 { int a __attribute__((aligned(16))); };
struct s12 f12_0(void) { while (1) {} }
void f12_1(struct s12 a0) {}
// Check for valid coercion. The struct should be passed/returned as i32, not
// as i64 for better code quality.
// rdar://8135035
-// CHECK: define void @f18(i32 %a, i32 %f18_arg1.coerce)
+// CHECK-LABEL: define void @f18(i32 %a, i32 %f18_arg1.coerce)
struct f18_s0 { int f0; };
void f18(int a, struct f18_s0 f18_arg1) { while (1) {} }
// Check byval alignment.
-// CHECK: define void @f19(%struct.s19* byval align 16 %x)
+// CHECK-LABEL: define void @f19(%struct.s19* byval align 16 %x)
struct s19 {
long double a;
};
void f19(struct s19 x) {}
-// CHECK: define void @f20(%struct.s20* byval align 32 %x)
+// CHECK-LABEL: define void @f20(%struct.s20* byval align 32 %x)
struct __attribute__((aligned(32))) s20 {
int x;
int y;
};
// rdar://7375902
-// CHECK: define i8* @f21(i64 %S.coerce0, i8* %S.coerce1)
+// CHECK-LABEL: define i8* @f21(i64 %S.coerce0, i8* %S.coerce1)
const char *f21(struct StringRef S) { return S.x+S.Ptr; }
// PR7567
void f23(int A, struct f23S B) {
- // CHECK: define void @f23(i32 %A, i64 %B.coerce0, i32 %B.coerce1)
+ // CHECK-LABEL: define void @f23(i32 %A, i64 %B.coerce0, i32 %B.coerce1)
}
struct f24s { long a; int b; };
// rdar://8248065
typedef float v4f32 __attribute__((__vector_size__(16)));
v4f32 f25(v4f32 X) {
- // CHECK: define <4 x float> @f25(<4 x float> %X)
+ // CHECK-LABEL: define <4 x float> @f25(<4 x float> %X)
// CHECK-NOT: alloca
// CHECK: alloca <4 x float>
// CHECK-NOT: alloca
};
struct v4f32wrapper f27(struct v4f32wrapper X) {
- // CHECK: define <4 x float> @f27(<4 x float> %X.coerce)
+ // CHECK-LABEL: define <4 x float> @f27(<4 x float> %X.coerce)
return X;
}
int y;
};
void f28(struct f28c C) {
- // CHECK: define void @f28(double %C.coerce0, i32 %C.coerce1)
+ // CHECK-LABEL: define void @f28(double %C.coerce0, i32 %C.coerce1)
}
struct f29a {
};
void f29a(struct f29a A) {
- // CHECK: define void @f29a(double %A.coerce0, i32 %A.coerce1)
+ // CHECK-LABEL: define void @f29a(double %A.coerce0, i32 %A.coerce1)
}
// rdar://8249586
struct S0 { char f0[8]; char f2; char f3; char f4; };
void f30(struct S0 p_4) {
- // CHECK: define void @f30(i64 %p_4.coerce0, i24 %p_4.coerce1)
+ // CHECK-LABEL: define void @f30(i64 %p_4.coerce0, i24 %p_4.coerce1)
}
// Pass the third element as a float when followed by tail padding.
// rdar://8251384
struct f31foo { float a, b, c; };
float f31(struct f31foo X) {
- // CHECK: define float @f31(<2 x float> %X.coerce0, float %X.coerce1)
+ // CHECK-LABEL: define float @f31(<2 x float> %X.coerce0, float %X.coerce1)
return X.c;
}
_Complex float f32(_Complex float A, _Complex float B) {
// rdar://6379669
- // CHECK: define <2 x float> @f32(<2 x float> %A.coerce, <2 x float> %B.coerce)
+ // CHECK-LABEL: define <2 x float> @f32(<2 x float> %A.coerce, <2 x float> %B.coerce)
return A+B;
}
typedef unsigned long long v1i64 __attribute__((__vector_size__(8)));
// rdar://8359248
-// CHECK: define i64 @f34(i64 %arg.coerce)
+// CHECK-LABEL: define i64 @f34(i64 %arg.coerce)
v1i64 f34(v1i64 arg) { return arg; }
// rdar://8358475
-// CHECK: define i64 @f35(i64 %arg.coerce)
+// CHECK-LABEL: define i64 @f35(i64 %arg.coerce)
typedef unsigned long v1i64_2 __attribute__((__vector_size__(8)));
v1i64_2 f35(v1i64_2 arg) { return arg+arg; }
func(ss);
}
-// CHECK: define double @f36(double %arg.coerce)
+// CHECK-LABEL: define double @f36(double %arg.coerce)
typedef unsigned v2i32 __attribute((__vector_size__(8)));
v2i32 f36(v2i32 arg) { return arg; }
func42(s);
}
-// CHECK: define i32 @f44
+// CHECK-LABEL: define i32 @f44
// CHECK: ptrtoint
// CHECK-NEXT: and {{.*}}, -32
// CHECK-NEXT: inttoptr
}
// Text that vec3 returns the correct LLVM IR type.
-// AVX: define i32 @foo(<3 x i64> %X)
+// AVX-LABEL: define i32 @foo(<3 x i64> %X)
typedef long long3 __attribute((ext_vector_type(3)));
int foo(long3 X)
{
void test49(double d, double e) {
test49_helper(d, e);
}
-// CHECK: define void @test49(
+// CHECK-LABEL: define void @test49(
// CHECK: [[T0:%.*]] = load double*
// CHECK-NEXT: [[T1:%.*]] = load double*
// CHECK-NEXT: call void (double, ...)* @test49_helper(double [[T0]], double [[T1]])
void test50(double d, double e) {
test50_helper(d, e);
}
-// CHECK: define void @test50(
+// CHECK-LABEL: define void @test50(
// CHECK: [[T0:%.*]] = load double*
// CHECK-NEXT: [[T1:%.*]] = load double*
// CHECK-NEXT: call void (double, double, ...)* bitcast (void (...)* @test50_helper to void (double, double, ...)*)(double [[T0]], double [[T1]])
*s = __builtin_va_arg(argList, struct test51_s);
}
-// CHECK: define void @test51
+// CHECK-LABEL: define void @test51
// CHECK: [[TMP_ADDR:%.*]] = alloca [[STRUCT_TEST51:%.*]], align 16
// CHECK: br i1
// CHECK: [[REG_SAVE_AREA_PTR:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 3
void test53(__m256 *m, __builtin_va_list argList) {
*m = __builtin_va_arg(argList, __m256);
}
-// AVX: define void @test53
+// AVX-LABEL: define void @test53
// AVX-NOT: br i1
// AVX: ret void
#include "../SemaCUDA/cuda.h"
-// CHECK: define void @device_function
+// CHECK-LABEL: define void @device_function
extern "C"
__device__ void device_function() {}
-// CHECK: define void @global_function
+// CHECK-LABEL: define void @global_function
extern "C"
__global__ void global_function() {
// CHECK: call void @device_function
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -O3 -emit-llvm -o - %s | FileCheck %s
// PR7490
-// CHECK: define signext i8 @_Z2f0v
+// CHECK-LABEL: define signext i8 @_Z2f0v
// CHECK: ret i8 0
// CHECK: }
inline void* operator new[](unsigned long, void* __p) { return __p; }
~A();
};
-// CHECK-NOT: define void @_ZN1AC1Ev
-// CHECK: define void @_ZN1AC2Ev
-// CHECK: define void @_ZN1AD1Ev
-// CHECK: define void @_ZN1AD2Ev
+// CHECK-NOT-LABEL: define void @_ZN1AC1Ev
+// CHECK-LABEL: define void @_ZN1AC2Ev
+// CHECK-LABEL: define void @_ZN1AD1Ev
+// CHECK-LABEL: define void @_ZN1AD2Ev
A::A() { }
A::~A() { }
// CHECK: @_Z1fIiEvv
void (*p2)() = f<int>;
}
-// CHECK: define linkonce_odr void @_Z1fIiEvT_
-// CHECK: define linkonce_odr void @_Z1fIiEvv
+// CHECK-LABEL: define linkonce_odr void @_Z1fIiEvT_
+// CHECK-LABEL: define linkonce_odr void @_Z1fIiEvv
namespace PR6973 {
template<typename T>
int TheStores __attribute__((aligned(16)));
};
-// CHECK: define void @f0
+// CHECK-LABEL: define void @f0
// CHECK: alloca %struct.s0, align 16
extern "C" void f0() {
(void) s0();
}
-// CHECK: define void @f1
+// CHECK-LABEL: define void @f1
// CHECK: alloca %struct.s0, align 16
extern "C" void f1() {
(void) (struct s0) { 0, 0, 0, 0 };
}
-// CHECK: define i32 @f2
+// CHECK-LABEL: define i32 @f2
// CHECK: alloca %struct.s1, align 2
struct s1 { short x; short y; };
extern "C" struct s1 f2(int a, struct s1 *x, struct s1 *y) {
struct E : public virtual EBase { virtual ~E() {} };
};
- // CHECK-1: define internal i32 @_ZN12_GLOBAL__N_13fooEv()
+ // CHECK-1-LABEL: define internal i32 @_ZN12_GLOBAL__N_13fooEv()
int foo() {
return 32;
}
- // CHECK-1: define internal i32 @_ZN12_GLOBAL__N_11A3fooEv()
+ // CHECK-1-LABEL: define internal i32 @_ZN12_GLOBAL__N_11A3fooEv()
namespace A {
int foo() {
return 45;
struct C;
}
- // CHECK-2: define void @_ZN5test24testEv()
+ // CHECK-2-LABEL: define void @_ZN5test24testEv()
// CHECK-2: call void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()
void test() {
A::B<C>::foo();
}
- // CHECK-2: define internal void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()
+ // CHECK-2-LABEL: define internal void @_ZN5test21A1BINS_12_GLOBAL__N_11CEE3fooEv()
}
namespace {
union { long l; };
};
- // CHECK: define void @_ZN6PR70211fENS_1XES0_
+ // CHECK-LABEL: define void @_ZN6PR70211fENS_1XES0_
void f(X x, X z) {
X x1;
};
A::A() : b(10) { }
- // CHECK: define void @_ZN5test21AC2Ev(
+ // CHECK-LABEL: define void @_ZN5test21AC2Ev(
// CHECK-NOT: }
// CHECK: store i32 10
// CHECK: }
};
};
- // CHECK: define void @_ZN7PR105121AC2Ev
+ // CHECK-LABEL: define void @_ZN7PR105121AC2Ev
// CHECK: [[THISADDR:%[a-zA-z0-9.]+]] = alloca [[A:%"struct[A-Za-z0-9:.]+"]]
// CHECK-NEXT: store [[A]]* [[THIS:%[a-zA-z0-9.]+]], [[A]]** [[THISADDR]]
// CHECK-NEXT: [[THIS1:%[a-zA-z0-9.]+]] = load [[A]]** [[THISADDR]]
// CHECK-NEXT: ret void
A::A() {}
- // CHECK: define void @_ZN7PR105121AC2Ei
+ // CHECK-LABEL: define void @_ZN7PR105121AC2Ei
// CHECK: [[THISADDR:%[a-zA-z0-9.]+]] = alloca [[A:%"struct[A-Za-z0-9:.]+"]]
// CHECK-NEXT: [[XADDR:%[a-zA-z0-9.]+]] = alloca i32
// CHECK-NEXT: store [[A]]* [[THIS:%[a-zA-z0-9.]+]], [[A]]** [[THISADDR]]
// CHECK-NEXT: ret void
A::A(int x) : x(x) { }
- // CHECK: define void @_ZN7PR105121AC2El
+ // CHECK-LABEL: define void @_ZN7PR105121AC2El
// CHECK: [[THISADDR:%[a-zA-z0-9.]+]] = alloca [[A:%"struct[A-Za-z0-9:.]+"]]
// CHECK-NEXT: [[XADDR:%[a-zA-z0-9.]+]] = alloca i64
// CHECK-NEXT: store [[A]]* [[THIS:%[a-zA-z0-9.]+]], [[A]]** [[THISADDR]]
};
A::A() : callback(0), callback_value(0) {}
- // CHECK: define void @_ZN5test31AC2Ev(
+ // CHECK-LABEL: define void @_ZN5test31AC2Ev(
// CHECK: [[THIS:%.*]] = load
// CHECK-NEXT: [[UNION:%.*]] = getelementptr inbounds {{.*}} [[THIS]], i32 0, i32 0
// CHECK-NEXT: [[STRUCT:%.*]] = bitcast {{.*}}* [[UNION]] to
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s
-// CHECK: define void @_ZN2B1D0Ev
+// CHECK-LABEL: define void @_ZN2B1D0Ev
// CHECK: [[T1:%.*]] = load void (%struct.B1*)** getelementptr inbounds (void (%struct.B1*)** bitcast ([5 x i8*]* @_ZTV2B1 to void (%struct.B1*)**), i64 2)
// CHECK-NEXT: call void [[T1]](%struct.B1* [[T2:%.*]])
-// CHECK: define void @_Z6DELETEP2B1
+// CHECK-LABEL: define void @_Z6DELETEP2B1
// CHECK: [[T3:%.*]] = load void (%struct.B1*)** getelementptr inbounds (void (%struct.B1*)** bitcast ([5 x i8*]* @_ZTV2B1 to void (%struct.B1*)**), i64 2)
// CHECK-NEXT: call void [[T3]](%struct.B1* [[T4:%.*]])
Derived d1; // ok
}
-// CHECK: define internal i32 @_Z1fj(
+// CHECK-LABEL: define internal i32 @_Z1fj(
inline unsigned f(unsigned n) { return n == 0 ? 0 : n + f(n-1); }
unsigned g(unsigned n) { return f(n); }
// rdar://problem/10133200: give explicit instantiations external linkage in kernel mode
-// CHECK: define void @_Z3barIiEvv()
+// CHECK-LABEL: define void @_Z3barIiEvv()
template <typename T> void bar() {}
template void bar<int>();
-// CHECK: define internal i32 @_Z5identIiET_S0_(
+// CHECK-LABEL: define internal i32 @_Z5identIiET_S0_(
template <typename X> X ident(X x) { return x; }
int foo(int n) { return ident(n); }
-// CHECK: define internal void @_ZN7DerivedD1Ev(
-// CHECK: define internal void @_ZN7DerivedD0Ev(
-// CHECK: define internal void @_ZN7DeriveddlEPv(
+// CHECK-LABEL: define internal void @_ZN7DerivedD1Ev(
+// CHECK-LABEL: define internal void @_ZN7DerivedD0Ev(
+// CHECK-LABEL: define internal void @_ZN7DeriveddlEPv(
// CHECK: call [[BAR:%.*]]* @_ZN3barC1Ev(
// CHECK-NEXT: call i32 @atexit(void ()* @__dtor_baz)
-// CHECK: define internal void @__dtor_baz()
+// CHECK-LABEL: define internal void @__dtor_baz()
// CHECK: call [[BAR]]* @_ZN3barD1Ev([[BAR]]* @baz)
// Destructors and constructors must return this.
void bar() { foo(); }
};
- // CHECK: define void @_ZN5test14testEv()
+ // CHECK-LABEL: define void @_ZN5test14testEv()
void test() {
// CHECK: [[AV:%.*]] = alloca [[A:%.*]], align 1
// CHECK: call [[A]]* @_ZN5test11AC1Ei([[A]]* [[AV]], i32 10)
};
void a() {
- // CHECK: define void @_ZN5test31aEv()
+ // CHECK-LABEL: define void @_ZN5test31aEv()
// CHECK: call noalias i8* @_Znam(i32 48)
// CHECK: store i32 4
// CHECK: store i32 10
}
void b(int n) {
- // CHECK: define void @_ZN5test31bEi(
+ // CHECK-LABEL: define void @_ZN5test31bEi(
// CHECK: [[N:%.*]] = load i32*
// CHECK: @llvm.umul.with.overflow.i32(i32 [[N]], i32 4)
// CHECK: @llvm.uadd.with.overflow.i32(i32 {{.*}}, i32 8)
}
void c() {
- // CHECK: define void @_ZN5test31cEv()
+ // CHECK-LABEL: define void @_ZN5test31cEv()
// CHECK: call noalias i8* @_Znam(i32 808)
// CHECK: store i32 4
// CHECK: store i32 200
}
void d(int n) {
- // CHECK: define void @_ZN5test31dEi(
+ // CHECK-LABEL: define void @_ZN5test31dEi(
// CHECK: [[N:%.*]] = load i32*
// CHECK: @llvm.umul.with.overflow.i32(i32 [[N]], i32 80)
// CHECK: [[NE:%.*]] = mul i32 [[N]], 20
}
void e(A *x) {
- // CHECK: define void @_ZN5test31eEPNS_1AE(
+ // CHECK-LABEL: define void @_ZN5test31eEPNS_1AE(
// CHECK: icmp eq {{.*}}, null
// CHECK: getelementptr {{.*}}, i64 -8
// CHECK: getelementptr {{.*}}, i64 4
}
void f(A (*x)[20]) {
- // CHECK: define void @_ZN5test31fEPA20_NS_1AE(
+ // CHECK-LABEL: define void @_ZN5test31fEPA20_NS_1AE(
// CHECK: icmp eq {{.*}}, null
// CHECK: getelementptr {{.*}}, i64 -8
// CHECK: getelementptr {{.*}}, i64 4
};
void a() {
- // CHECK: define void @_ZN5test41aEv()
+ // CHECK-LABEL: define void @_ZN5test41aEv()
// CHECK: call noalias i8* @_Znam(i32 48)
// CHECK: store i32 4
// CHECK: store i32 10
}
void b(int n) {
- // CHECK: define void @_ZN5test41bEi(
+ // CHECK-LABEL: define void @_ZN5test41bEi(
// CHECK: [[N:%.*]] = load i32*
// CHECK: @llvm.umul.with.overflow.i32(i32 [[N]], i32 4)
// CHECK: @llvm.uadd.with.overflow.i32(i32 {{.*}}, i32 8)
}
void c() {
- // CHECK: define void @_ZN5test41cEv()
+ // CHECK-LABEL: define void @_ZN5test41cEv()
// CHECK: call noalias i8* @_Znam(i32 808)
// CHECK: store i32 4
// CHECK: store i32 200
}
void d(int n) {
- // CHECK: define void @_ZN5test41dEi(
+ // CHECK-LABEL: define void @_ZN5test41dEi(
// CHECK: [[N:%.*]] = load i32*
// CHECK: @llvm.umul.with.overflow.i32(i32 [[N]], i32 80)
// CHECK: [[NE:%.*]] = mul i32 [[N]], 20
}
void e(A *x) {
- // CHECK: define void @_ZN5test41eEPNS_1AE(
+ // CHECK-LABEL: define void @_ZN5test41eEPNS_1AE(
// CHECK: [[ALLOC:%.*]] = getelementptr inbounds {{.*}}, i64 -8
// CHECK: getelementptr inbounds {{.*}}, i64 4
// CHECK: bitcast
}
void f(A (*x)[20]) {
- // CHECK: define void @_ZN5test41fEPA20_NS_1AE(
+ // CHECK-LABEL: define void @_ZN5test41fEPA20_NS_1AE(
// CHECK: [[ALLOC:%.*]] = getelementptr inbounds {{.*}}, i64 -8
// CHECK: getelementptr inbounds {{.*}}, i64 4
// CHECK: bitcast
~A();
};
- // CHECK: define void @_ZN5test54testEPNS_1AE
+ // CHECK-LABEL: define void @_ZN5test54testEPNS_1AE
void test(A *a) {
// CHECK: [[PTR:%.*]] = alloca [[A:%.*]]*, align 4
// CHECK-NEXT: store [[A]]* {{.*}}, [[A]]** [[PTR]], align 4
virtual ~A();
};
- // CHECK: define void @_ZN5test64testEPNS_1AE
+ // CHECK-LABEL: define void @_ZN5test64testEPNS_1AE
void test(A *a) {
// CHECK: [[AVAR:%.*]] = alloca [[A:%.*]]*, align 4
// CHECK-NEXT: store [[A]]* {{.*}}, [[A]]** [[AVAR]], align 4
// Static and guard tested at top of file
- // CHECK: define void @_ZN5test74testEv()
+ // CHECK-LABEL: define void @_ZN5test74testEv()
void test() {
// CHECK: [[T0:%.*]] = load i32* @_ZGVZN5test74testEvE1x
// CHECK-NEXT: [[T1:%.*]] = and i32 [[T0]], 1
// Static and guard tested at top of file
- // CHECK: define void @_ZN5test84testEv()
+ // CHECK-LABEL: define void @_ZN5test84testEv()
void test() {
// CHECK: [[T0:%.*]] = load i32* @_ZGVZN5test84testEvE1x
// CHECK-NEXT: [[T1:%.*]] = and i32 [[T0]], 1
void testDelete(A *array) {
delete[] array;
}
-// CHECK: define void @_ZN5test910testDeleteEPNS_1AE(
+// CHECK-LABEL: define void @_ZN5test910testDeleteEPNS_1AE(
// CHECK: [[BEGIN:%.*]] = load [[TEST9]]**
// CHECK-NEXT: [[T0:%.*]] = icmp eq [[TEST9]]* [[BEGIN]], null
// CHECK-NEXT: br i1 [[T0]],
// CHECK: call [[C]]* @_ZN5test21CD1Ev(
// CHECK: ret [[C]]* undef
- // CHECK: define linkonce_odr void @_ZTv0_n12_N5test21CD0Ev(
+ // CHECK-LABEL: define linkonce_odr void @_ZTv0_n12_N5test21CD0Ev(
// CHECK: call void @_ZN5test21CD0Ev(
// CHECK: ret void
void f();
};
- // CHECK: define linkonce_odr void @_ZN7PR114113PtrIiE1fEv
+ // CHECK-LABEL: define linkonce_odr void @_ZN7PR114113PtrIiE1fEv
// CHECK-NOT: ret
template<typename _Tp> inline void Ptr<_Tp>::f() {
int* _refcount;
_Atomic(B) b;
-// CHECK: define void @_Z11atomic_initR1Ai
+// CHECK-LABEL: define void @_Z11atomic_initR1Ai
void atomic_init(A& a, int i) {
// CHECK-NOT: atomic
// CHECK: tail call void @_ZN1BC1Ei
// CHECK-NEXT: ret void
}
-// CHECK: define void @_Z16atomic_init_boolPU7_Atomicbb
+// CHECK-LABEL: define void @_Z16atomic_init_boolPU7_Atomicbb
void atomic_init_bool(_Atomic(bool) *ab, bool b) {
// CHECK-NOT: atomic
// CHECK: {{zext i1.*to i8}}
AtomicBoolMember(bool b);
};
-// CHECK: define void @_ZN16AtomicBoolMemberC2Eb
+// CHECK-LABEL: define void @_ZN16AtomicBoolMemberC2Eb
// CHECK: {{zext i1.*to i8}}
// CHECK-NEXT: store i8
// CHECK-NEXT: ret void
void C::bar4() { }
// PR6635
-// CHECK: define i32 @_Z5test1v()
+// CHECK-LABEL: define i32 @_Z5test1v()
int test1() { return 10; }
// CHECK at top of file
extern "C" int test2() __attribute__((alias("_Z5test1v")));
unsigned b71 : 2;
};
unsigned read00(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read00
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read00
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[and:.*]] = and i64 %[[val]], 16383
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read00
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read00
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 50
return s->b00;
}
unsigned read01(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read01
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read01
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 14
// CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 3
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read01
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read01
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 48
return s->b01;
}
unsigned read20(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read20
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read20
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 16
// CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 63
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read20
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read20
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 42
return s->b20;
}
unsigned read21(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read21
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read21
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 22
// CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 3
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read21
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read21
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 40
return s->b21;
}
unsigned read30(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read30
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read30
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 24
// CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 1073741823
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read30
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read30
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 10
return s->b30;
}
unsigned read31(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read31
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read31
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 54
// CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 3
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read31
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read31
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 8
return s->b31;
}
unsigned read70(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read70
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read70
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 56
// CHECK-X86-64: %[[and:.*]] = and i64 %[[shr]], 63
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read70
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read70
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i64 %[[val]], 2
return s->b70;
}
unsigned read71(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N06read71
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N06read71
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-X86-64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-X86-64: %[[shr:.*]] = lshr i64 %[[val]], 62
// CHECK-X86-64: %[[trunc:.*]] = trunc i64 %[[shr]] to i32
// CHECK-X86-64: ret i32 %[[trunc]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N06read71
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N06read71
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i64*
// CHECK-PPC64: %[[val:.*]] = load i64* %[[ptr]]
// CHECK-PPC64: %[[and:.*]] = and i64 %[[val]], 3
char c;
};
unsigned read(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N14read
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N14read
// CHECK-X86-64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-X86-64: %[[val:.*]] = load i8* %[[ptr]]
// CHECK-X86-64: %[[and:.*]] = and i8 %[[val]], 1
// CHECK-X86-64: %[[ext:.*]] = zext i8 %[[and]] to i32
// CHECK-X86-64: ret i32 %[[ext]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N14read
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N14read
// CHECK-PPC64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-PPC64: %[[val:.*]] = load i8* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i8 %[[val]], 7
return s->b;
}
void write(S* s, unsigned x) {
- // CHECK-X86-64: define void @_ZN2N15write
+ // CHECK-X86-64-LABEL: define void @_ZN2N15write
// CHECK-X86-64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-X86-64: %[[x_trunc:.*]] = trunc i32 %{{.*}} to i8
// CHECK-X86-64: %[[old:.*]] = load i8* %[[ptr]]
// CHECK-X86-64: %[[old_and:.*]] = and i8 %[[old]], -2
// CHECK-X86-64: %[[new:.*]] = or i8 %[[old_and]], %[[x_and]]
// CHECK-X86-64: store i8 %[[new]], i8* %[[ptr]]
- // CHECK-PPC64: define void @_ZN2N15write
+ // CHECK-PPC64-LABEL: define void @_ZN2N15write
// CHECK-PPC64: %[[ptr:.*]] = getelementptr inbounds %{{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-PPC64: %[[x_trunc:.*]] = trunc i32 %{{.*}} to i8
// CHECK-PPC64: %[[old:.*]] = load i8* %[[ptr]]
void *p;
};
unsigned read(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N24read
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N24read
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-X86-64: %[[val:.*]] = load i32* %[[ptr]]
// CHECK-X86-64: %[[and:.*]] = and i32 %[[val]], 16777215
// CHECK-X86-64: ret i32 %[[and]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N24read
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N24read
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-PPC64: %[[val:.*]] = load i32* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i32 %[[val]], 8
return s->b;
}
void write(S* s, unsigned x) {
- // CHECK-X86-64: define void @_ZN2N25write
+ // CHECK-X86-64-LABEL: define void @_ZN2N25write
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-X86-64: %[[old:.*]] = load i32* %[[ptr]]
// CHECK-X86-64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215
// CHECK-X86-64: %[[old_and:.*]] = and i32 %[[old]], -16777216
// CHECK-X86-64: %[[new:.*]] = or i32 %[[old_and]], %[[x_and]]
// CHECK-X86-64: store i32 %[[new]], i32* %[[ptr]]
- // CHECK-PPC64: define void @_ZN2N25write
+ // CHECK-PPC64-LABEL: define void @_ZN2N25write
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-PPC64: %[[old:.*]] = load i32* %[[ptr]]
// CHECK-PPC64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215
unsigned b : 24;
};
unsigned read(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N34read
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N34read
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-X86-64: %[[val:.*]] = load i32* %[[ptr]]
// CHECK-X86-64: %[[and:.*]] = and i32 %[[val]], 16777215
// CHECK-X86-64: ret i32 %[[and]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N34read
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N34read
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-PPC64: %[[val:.*]] = load i32* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i32 %[[val]], 8
return s->b;
}
void write(S* s, unsigned x) {
- // CHECK-X86-64: define void @_ZN2N35write
+ // CHECK-X86-64-LABEL: define void @_ZN2N35write
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-X86-64: %[[old:.*]] = load i32* %[[ptr]]
// CHECK-X86-64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215
// CHECK-X86-64: %[[old_and:.*]] = and i32 %[[old]], -16777216
// CHECK-X86-64: %[[new:.*]] = or i32 %[[old_and]], %[[x_and]]
// CHECK-X86-64: store i32 %[[new]], i32* %[[ptr]]
- // CHECK-PPC64: define void @_ZN2N35write
+ // CHECK-PPC64-LABEL: define void @_ZN2N35write
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-PPC64: %[[old:.*]] = load i32* %[[ptr]]
// CHECK-PPC64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215
// FIXME: We should widen this load as long as the function isn't being
// instrumented by thread-sanitizer.
//
- // CHECK-X86-64: define i32 @_ZN2N44read
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N44read
// CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
// CHECK-X86-64: %[[val:.*]] = load i24* %[[ptr]]
// CHECK-X86-64: %[[ext:.*]] = zext i24 %[[val]] to i32
// CHECK-X86-64: ret i32 %[[ext]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N44read
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N44read
// CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
// CHECK-PPC64: %[[val:.*]] = load i24* %[[ptr]]
return s->b;
}
void write(Base* s, unsigned x) {
- // CHECK-X86-64: define void @_ZN2N45write
+ // CHECK-X86-64-LABEL: define void @_ZN2N45write
// CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
// CHECK-X86-64: %[[new:.*]] = trunc i32 %{{.*}} to i24
// CHECK-X86-64: store i24 %[[new]], i24* %[[ptr]]
- // CHECK-PPC64: define void @_ZN2N45write
+ // CHECK-PPC64-LABEL: define void @_ZN2N45write
// CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
// CHECK-PPC64: %[[new:.*]] = trunc i32 %{{.*}} to i24
struct Y { unsigned b : 24; } y;
};
unsigned read(U* u) {
- // CHECK-X86-64: define i32 @_ZN2N54read
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N54read
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-X86-64: %[[val:.*]] = load i32* %[[ptr]]
// CHECK-X86-64: %[[and:.*]] = and i32 %[[val]], 16777215
// CHECK-X86-64: ret i32 %[[and]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N54read
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N54read
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-PPC64: %[[val:.*]] = load i32* %[[ptr]]
// CHECK-PPC64: %[[shr:.*]] = lshr i32 %[[val]], 8
return u->y.b;
}
void write(U* u, unsigned x) {
- // CHECK-X86-64: define void @_ZN2N55write
+ // CHECK-X86-64-LABEL: define void @_ZN2N55write
// CHECK-X86-64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-X86-64: %[[old:.*]] = load i32* %[[ptr]]
// CHECK-X86-64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215
// CHECK-X86-64: %[[old_and:.*]] = and i32 %[[old]], -16777216
// CHECK-X86-64: %[[new:.*]] = or i32 %[[old_and]], %[[x_and]]
// CHECK-X86-64: store i32 %[[new]], i32* %[[ptr]]
- // CHECK-PPC64: define void @_ZN2N55write
+ // CHECK-PPC64-LABEL: define void @_ZN2N55write
// CHECK-PPC64: %[[ptr:.*]] = bitcast %{{.*}}* %{{.*}} to i32*
// CHECK-PPC64: %[[old:.*]] = load i32* %[[ptr]]
// CHECK-PPC64: %[[x_and:.*]] = and i32 %{{.*}}, 16777215
unsigned char b2 : 8;
};
unsigned read(S* s) {
- // CHECK-X86-64: define i32 @_ZN2N64read
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N64read
// CHECK-X86-64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24*
// CHECK-X86-64: %[[val1:.*]] = load i24* %[[ptr1]]
// CHECK-X86-64: %[[ext1:.*]] = zext i24 %[[val1]] to i32
// CHECK-X86-64: %[[ext2:.*]] = zext i8 %[[val2]] to i32
// CHECK-X86-64: %[[add:.*]] = add nsw i32 %[[ext1]], %[[ext2]]
// CHECK-X86-64: ret i32 %[[add]]
- // CHECK-PPC64: define zeroext i32 @_ZN2N64read
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N64read
// CHECK-PPC64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24*
// CHECK-PPC64: %[[val1:.*]] = load i24* %[[ptr1]]
// CHECK-PPC64: %[[ext1:.*]] = zext i24 %[[val1]] to i32
return s->b1 + s->b2;
}
void write(S* s, unsigned x) {
- // CHECK-X86-64: define void @_ZN2N65write
+ // CHECK-X86-64-LABEL: define void @_ZN2N65write
// CHECK-X86-64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24*
// CHECK-X86-64: %[[new1:.*]] = trunc i32 %{{.*}} to i24
// CHECK-X86-64: store i24 %[[new1]], i24* %[[ptr1]]
// CHECK-X86-64: %[[new2:.*]] = trunc i32 %{{.*}} to i8
// CHECK-X86-64: %[[ptr2:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
// CHECK-X86-64: store i8 %[[new2]], i8* %[[ptr2]]
- // CHECK-PPC64: define void @_ZN2N65write
+ // CHECK-PPC64-LABEL: define void @_ZN2N65write
// CHECK-PPC64: %[[ptr1:.*]] = bitcast {{.*}}* %{{.*}} to i24*
// CHECK-PPC64: %[[new1:.*]] = trunc i32 %{{.*}} to i24
// CHECK-PPC64: store i24 %[[new1]], i24* %[[ptr1]]
return 0;
}
-// CHECK: define internal void @__Block_byref_object_copy_
+// CHECK-LABEL: define internal void @__Block_byref_object_copy_
// CHECK: call {{.*}} @_ZN1AC1ERKS_
-// CHECK: define internal void @__Block_byref_object_dispose_
+// CHECK-LABEL: define internal void @__Block_byref_object_dispose_
// CHECK: call {{.*}} @_ZN1AD1Ev
-// CHECK: define internal void @__copy_helper_block_
+// CHECK-LABEL: define internal void @__copy_helper_block_
// CHECK: call void @_Block_object_assign
-// CHECK: define internal void @__destroy_helper_block_
+// CHECK-LABEL: define internal void @__destroy_helper_block_
// CHECK: call void @_Block_object_dispose
// rdar://problem/11135650
};
-// CHECK: define internal void @___ZN4ZoneC2Ev_block_invoke
-// CHECK: define internal void @___ZN4ZoneC2Ev_block_invoke_
-// CHECK: define internal void @___ZN4ZoneD2Ev_block_invoke
-// CHECK: define internal void @___ZN4ZoneD2Ev_block_invoke_
-// CHECK: define internal void @___ZN1XC1Ev_block_invoke
-// CHECK: define internal void @___ZN1XC1Ev_block_invoke_
-// CHECK: define internal void @___ZN1XC2Ev_block_invoke
-// CHECK: define internal void @___ZN1XC2Ev_block_invoke_
-// CHECK: define internal void @___ZN1XD2Ev_block_invoke
-// CHECK: define internal void @___ZN1XD2Ev_block_invoke_
+// CHECK-LABEL: define internal void @___ZN4ZoneC2Ev_block_invoke
+// CHECK-LABEL: define internal void @___ZN4ZoneC2Ev_block_invoke_
+// CHECK-LABEL: define internal void @___ZN4ZoneD2Ev_block_invoke
+// CHECK-LABEL: define internal void @___ZN4ZoneD2Ev_block_invoke_
+// CHECK-LABEL: define internal void @___ZN1XC1Ev_block_invoke
+// CHECK-LABEL: define internal void @___ZN1XC1Ev_block_invoke_
+// CHECK-LABEL: define internal void @___ZN1XC2Ev_block_invoke
+// CHECK-LABEL: define internal void @___ZN1XC2Ev_block_invoke_
+// CHECK-LABEL: define internal void @___ZN1XD2Ev_block_invoke
+// CHECK-LABEL: define internal void @___ZN1XD2Ev_block_invoke_
};
lambda(); // make sure we emit the invocation function
}
- // CHECK: define internal void @"_ZZN20test_block_in_lambda4testENS_1AEENK3$_0clEv"(
+ // CHECK-LABEL: define internal void @"_ZZN20test_block_in_lambda4testENS_1AEENK3$_0clEv"(
// CHECK: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]], align 8
// CHECK: [[THIS:%.*]] = load [[LAMBDA_T:%.*]]**
// CHECK: [[TO_DESTROY:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -emit-llvm -o - | FileCheck %s
namespace test0 {
- // CHECK: define void @_ZN5test04testEi(
+ // CHECK-LABEL: define void @_ZN5test04testEi(
// CHECK: define internal void @___ZN5test04testEi_block_invoke{{.*}}(
// CHECK: define internal void @___ZN5test04testEi_block_invoke_2{{.*}}(
void test(int x) {
namespace test1 {
// Capturing const objects doesn't require a local block.
- // CHECK: define void @_ZN5test15test1Ev()
+ // CHECK-LABEL: define void @_ZN5test15test1Ev()
// CHECK: store void ()* bitcast ({{.*}} @__block_literal_global{{.*}} to void ()*), void ()** @out
void test1() {
const int NumHorsemen = 4;
}
// That applies to structs too...
- // CHECK: define void @_ZN5test15test2Ev()
+ // CHECK-LABEL: define void @_ZN5test15test2Ev()
// CHECK: store void ()* bitcast ({{.*}} @__block_literal_global{{.*}} to void ()*), void ()** @out
struct loc { double x, y; };
void test2() {
}
// ...unless they have mutable fields...
- // CHECK: define void @_ZN5test15test3Ev()
+ // CHECK-LABEL: define void @_ZN5test15test3Ev()
// CHECK: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
// CHECK: store void ()* [[T0]], void ()** @out
}
// ...or non-trivial destructors...
- // CHECK: define void @_ZN5test15test4Ev()
+ // CHECK-LABEL: define void @_ZN5test15test4Ev()
// CHECK: [[OBJ:%.*]] = alloca
// CHECK: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
~B();
};
- // CHECK: define void @_ZN5test24testEv()
+ // CHECK-LABEL: define void @_ZN5test24testEv()
void test() {
__block A a;
__block B b;
}
- // CHECK: define internal void @__Block_byref_object_copy
+ // CHECK-LABEL: define internal void @__Block_byref_object_copy
// CHECK: call void @_ZN5test21AC1ERKS0_(
- // CHECK: define internal void @__Block_byref_object_dispose
+ // CHECK-LABEL: define internal void @__Block_byref_object_dispose
// CHECK: call void @_ZN5test21AD1Ev(
- // CHECK: define internal void @__Block_byref_object_copy
+ // CHECK-LABEL: define internal void @__Block_byref_object_copy
// CHECK: call void @_ZN5test21BC1ERKS0_(
- // CHECK: define internal void @__Block_byref_object_dispose
+ // CHECK-LABEL: define internal void @__Block_byref_object_dispose
// CHECK: call void @_ZN5test21BD1Ev(
}
extern void consume(void(^)());
consume(^{ return foo(A()); });
}
- // CHECK: define void @_ZN5test44testEv()
- // CHECK: define internal void @___ZN5test44testEv_block_invoke
+ // CHECK-LABEL: define void @_ZN5test44testEv()
+ // CHECK-LABEL: define internal void @___ZN5test44testEv_block_invoke
// CHECK: [[TMP:%.*]] = alloca [[A:%.*]], align 1
// CHECK-NEXT: store i8* [[BLOCKDESC:%.*]], i8** {{.*}}, align 8
// CHECK-NEXT: load i8*
doWithBlock(b);
}
- // CHECK: define void @_ZN5test54testEb(
+ // CHECK-LABEL: define void @_ZN5test54testEb(
// CHECK: [[COND:%.*]] = alloca i8
// CHECK-NEXT: [[X:%.*]] = alloca [[A:%.*]], align 4
// CHECK-NEXT: [[B:%.*]] = alloca void ()*, align 8
bar();
}
- // CHECK: define void @_ZN5test64testEv()
+ // CHECK-LABEL: define void @_ZN5test64testEv()
// CHECK: [[TEMP:%.*]] = alloca [[A:%.*]], align 1
// CHECK-NEXT: call void @_ZN5test61AC1Ev([[A]]* [[TEMP]])
// CHECK-NEXT: call void @_ZN5test63fooERKNS_1AEU13block_pointerFvvE(
{
if ((a1.m_sorted = b)) {}
}
-// CHECK: define void @_Z5func1bR1A
+// CHECK-LABEL: define void @_Z5func1bR1A
// CHECK: br i1
// CHECK: ret void
}
}
-// CHECK: define void @_ZN1N1X1fEv
+// CHECK-LABEL: define void @_ZN1N1X1fEv
extern "C" {
static void test2_f() {
}
- // CHECK: define internal void @_Z7test2_fv
+ // CHECK-LABEL: define internal void @_Z7test2_fv
static void test2_f(int x) {
}
- // CHECK: define internal void @_Z7test2_fi
+ // CHECK-LABEL: define internal void @_Z7test2_fi
void test2_use() {
test2_f();
test2_f(42);
~Y();
};
-// CHECK: define void @_Z1fiPPKc(
+// CHECK-LABEL: define void @_Z1fiPPKc(
void f(int argc, const char* argv[]) {
// CHECK: call void @_ZN1XC1Ev
X x;
return x;
}();
- // CHECK-2: define void @_Z5test2i
+ // CHECK-2-LABEL: define void @_Z5test2i
// CHECK-2: call {{.*}} @[[Lambda:["$\w]+]]
//
// CHECK-2: define internal {{.*}} @[[Lambda]]
// CHECK-3: %[[Capture:struct\.anon[\.0-9]*]] = type { i32* }
- // CHECK-3: define void @_Z5test3i
+ // CHECK-3-LABEL: define void @_Z5test3i
// CHECK-3: store i32*
// CHECK-3: call void @{{.*}}__captured_stmt
// CHECK-3: ret void
Foo f;
f.x = 5;
}
- // CHECK-4: define void @_Z5test4v
+ // CHECK-4-LABEL: define void @_Z5test4v
// CHECK-4: call void @[[HelperName:["$_A-Za-z0-9]+]](%[[Capture:.*]]*
// CHECK-4: ret void
//
// offset. The pointer before subtraction doesn't need to be aligned for
// the destination type.
-// CHECK-LABEL: define void @_Z16downcast_pointerP1B(%class.B* %b)
+// CHECK-LABEL-LABEL: define void @_Z16downcast_pointerP1B(%class.B* %b)
void downcast_pointer(B *b) {
(void) static_cast<C*>(b);
// Alignment check from EmitTypeCheck(TCK_DowncastPointer, ...)
// CHECK-NEXT: br i1 [[AND]]
}
-// CHECK-LABEL: define void @_Z18downcast_referenceR1B(%class.B* %b)
+// CHECK-LABEL-LABEL: define void @_Z18downcast_referenceR1B(%class.B* %b)
void downcast_reference(B &b) {
(void) static_cast<C&>(b);
// Alignment check from EmitTypeCheck(TCK_DowncastReference, ...)
X x;
};
-// CHECK: define i32 @_Z1fv()
+// CHECK-LABEL: define i32 @_Z1fv()
int f() {
// CHECK: [[LVALUE:%[a-z0-9.]+]] = alloca
// CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}}* [[LVALUE]], i32 0, i32 0
return ((Y){17, "seventeen"}).i;
}
-// CHECK: define i32 @_Z1gv()
+// CHECK-LABEL: define i32 @_Z1gv()
int g() {
// CHECK: store [2 x i32]* %{{[a-z0-9.]+}}, [2 x i32]** [[V:%[a-z0-9.]+]]
const int (&v)[2] = (int [2]) {1,2};
X getX();
-// CHECK: define void @_Z11if_destructi(
+// CHECK-LABEL: define void @_Z11if_destructi(
void if_destruct(int z) {
// Verify that the condition variable is destroyed at the end of the
// "if" statement.
int foo();
-// CHECK: define void @_Z14while_destructi
+// CHECK-LABEL: define void @_Z14while_destructi
void while_destruct(int z) {
// CHECK: [[Z:%.*]] = alloca i32
// CHECK: [[CLEANUPDEST:%.*]] = alloca i32
// CHECK: ret
}
-// CHECK: define void @_Z12for_destructi(
+// CHECK-LABEL: define void @_Z12for_destructi(
void for_destruct(int z) {
// CHECK: [[Z:%.*]] = alloca i32
// CHECK: [[CLEANUPDEST:%.*]] = alloca i32
}
void do_destruct(int z) {
- // CHECK: define void @_Z11do_destruct
+ // CHECK-LABEL: define void @_Z11do_destruct
do {
// CHECK: store i32 77
z = 77;
};
B test0(B &x) {
- // CHECK: define void @_ZN5test35test0ERNS_1BE(
+ // CHECK-LABEL: define void @_ZN5test35test0ERNS_1BE(
// CHECK: [[X:%.*]] = alloca [[B:%.*]]*,
// CHECK-NEXT: store [[B]]* {{%.*}}, [[B]]** [[X]]
// CHECK-NEXT: [[T0:%.*]] = load [[B]]** [[X]]
}
B test1() {
- // CHECK: define void @_ZN5test35test1Ev(
+ // CHECK-LABEL: define void @_ZN5test35test1Ev(
// CHECK: [[TEMP:%.*]] = alloca [[B]],
// CHECK-NEXT: call void @_ZN5test312test1_helperEv([[B]]* sret [[TEMP]])
// CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[TEMP]])
A test2(B &x) {
- // CHECK: define void @_ZN5test35test2ERNS_1BE(
+ // CHECK-LABEL: define void @_ZN5test35test2ERNS_1BE(
// CHECK: [[X:%.*]] = alloca [[B]]*,
// CHECK-NEXT: store [[B]]* {{%.*}}, [[B]]** [[X]]
// CHECK-NEXT: [[T0:%.*]] = load [[B]]** [[X]]
}
A test3() {
- // CHECK: define void @_ZN5test35test3Ev(
+ // CHECK-LABEL: define void @_ZN5test35test3Ev(
// CHECK: [[TEMP:%.*]] = alloca [[B]],
// CHECK-NEXT: call void @_ZN5test312test3_helperEv([[B]]* sret [[TEMP]])
// CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[TEMP]])
}
-// CHECK: define i32 @_Z12getCtorCallsv()
+// CHECK-LABEL: define i32 @_Z12getCtorCallsv()
int getCtorCalls() {
// CHECK: ret i32 5
return ctorcalls;
}
-// CHECK: define i32 @_Z12getDtorCallsv()
+// CHECK-LABEL: define i32 @_Z12getDtorCallsv()
int getDtorCalls() {
// CHECK: ret i32 5
return dtorcalls;
}
-// CHECK: define zeroext i1 @_Z7successv()
+// CHECK-LABEL: define zeroext i1 @_Z7successv()
bool success() {
// CHECK: ret i1 true
return ctorcalls == dtorcalls;
// PR6521
void bar();
struct Foo {
- // CHECK: define linkonce_odr void @_ZN3Foo3fooEv
+ // CHECK-LABEL: define linkonce_odr void @_ZN3Foo3fooEv
static void foo() __attribute__((constructor)) {
bar();
}
B::~B() { }
#endif
-// CHECKGEN: define void @_ZN1BC1EPi(%class.B* %this, i32* %i)
-// CHECKGEN: define void @_ZN1BC2EPi(%class.B* %this, i32* %i)
-// CHECKGEN: define void @_ZN1BD1Ev(%class.B* %this)
-// CHECKGEN: define void @_ZN1BD2Ev(%class.B* %this)
+// CHECKGEN-LABEL: define void @_ZN1BC1EPi(%class.B* %this, i32* %i)
+// CHECKGEN-LABEL: define void @_ZN1BC2EPi(%class.B* %this, i32* %i)
+// CHECKGEN-LABEL: define void @_ZN1BD1Ev(%class.B* %this)
+// CHECKGEN-LABEL: define void @_ZN1BD2Ev(%class.B* %this)
-// CHECKARM: define %class.B* @_ZN1BC1EPi(%class.B* returned %this, i32* %i)
-// CHECKARM: define %class.B* @_ZN1BC2EPi(%class.B* returned %this, i32* %i)
-// CHECKARM: define %class.B* @_ZN1BD1Ev(%class.B* returned %this)
-// CHECKARM: define %class.B* @_ZN1BD2Ev(%class.B* returned %this)
+// CHECKARM-LABEL: define %class.B* @_ZN1BC1EPi(%class.B* returned %this, i32* %i)
+// CHECKARM-LABEL: define %class.B* @_ZN1BC2EPi(%class.B* returned %this, i32* %i)
+// CHECKARM-LABEL: define %class.B* @_ZN1BD1Ev(%class.B* returned %this)
+// CHECKARM-LABEL: define %class.B* @_ZN1BD2Ev(%class.B* returned %this)
// CHECKMS: define %class.B* @"\01??0B@@QEAA@PEAH@Z"(%class.B* returned %this, i32* %i)
C::~C() { }
#endif
-// CHECKGEN: define void @_ZN1CC1EPiPc(%class.C* %this, i32* %i, i8* %c)
-// CHECKGEN: define void @_ZN1CC2EPiPc(%class.C* %this, i32* %i, i8* %c)
-// CHECKGEN: define void @_ZN1CD0Ev(%class.C* %this)
-// CHECKGEN: define void @_ZN1CD1Ev(%class.C* %this)
-// CHECKGEN: define void @_ZN1CD2Ev(%class.C* %this)
+// CHECKGEN-LABEL: define void @_ZN1CC1EPiPc(%class.C* %this, i32* %i, i8* %c)
+// CHECKGEN-LABEL: define void @_ZN1CC2EPiPc(%class.C* %this, i32* %i, i8* %c)
+// CHECKGEN-LABEL: define void @_ZN1CD0Ev(%class.C* %this)
+// CHECKGEN-LABEL: define void @_ZN1CD1Ev(%class.C* %this)
+// CHECKGEN-LABEL: define void @_ZN1CD2Ev(%class.C* %this)
-// CHECKARM: define %class.C* @_ZN1CC1EPiPc(%class.C* returned %this, i32* %i, i8* %c)
-// CHECKARM: define %class.C* @_ZN1CC2EPiPc(%class.C* returned %this, i32* %i, i8* %c)
-// CHECKARM: define void @_ZN1CD0Ev(%class.C* %this)
-// CHECKARM: define %class.C* @_ZN1CD1Ev(%class.C* returned %this)
-// CHECKARM: define %class.C* @_ZN1CD2Ev(%class.C* returned %this)
+// CHECKARM-LABEL: define %class.C* @_ZN1CC1EPiPc(%class.C* returned %this, i32* %i, i8* %c)
+// CHECKARM-LABEL: define %class.C* @_ZN1CC2EPiPc(%class.C* returned %this, i32* %i, i8* %c)
+// CHECKARM-LABEL: define void @_ZN1CD0Ev(%class.C* %this)
+// CHECKARM-LABEL: define %class.C* @_ZN1CD1Ev(%class.C* returned %this)
+// CHECKARM-LABEL: define %class.C* @_ZN1CD2Ev(%class.C* returned %this)
// CHECKMS: define %class.C* @"\01??0C@@QEAA@PEAHPEAD@Z"(%class.C* returned %this, i32* %i, i8* %c)
D::~D() { }
#endif
-// CHECKGEN: define void @_ZN1DC1Ev(%class.D* %this)
-// CHECKGEN: define void @_ZN1DC2Ev(%class.D* %this, i8** %vtt)
-// CHECKGEN: define void @_ZN1DD1Ev(%class.D* %this)
-// CHECKGEN: define void @_ZN1DD2Ev(%class.D* %this, i8** %vtt)
+// CHECKGEN-LABEL: define void @_ZN1DC1Ev(%class.D* %this)
+// CHECKGEN-LABEL: define void @_ZN1DC2Ev(%class.D* %this, i8** %vtt)
+// CHECKGEN-LABEL: define void @_ZN1DD1Ev(%class.D* %this)
+// CHECKGEN-LABEL: define void @_ZN1DD2Ev(%class.D* %this, i8** %vtt)
-// CHECKARM: define %class.D* @_ZN1DC1Ev(%class.D* returned %this)
-// CHECKARM: define %class.D* @_ZN1DC2Ev(%class.D* returned %this, i8** %vtt)
-// CHECKARM: define %class.D* @_ZN1DD1Ev(%class.D* returned %this)
-// CHECKARM: define %class.D* @_ZN1DD2Ev(%class.D* returned %this, i8** %vtt)
+// CHECKARM-LABEL: define %class.D* @_ZN1DC1Ev(%class.D* returned %this)
+// CHECKARM-LABEL: define %class.D* @_ZN1DC2Ev(%class.D* returned %this, i8** %vtt)
+// CHECKARM-LABEL: define %class.D* @_ZN1DD1Ev(%class.D* returned %this)
+// CHECKARM-LABEL: define %class.D* @_ZN1DD2Ev(%class.D* returned %this, i8** %vtt)
class E {
public:
e2->~E();
}
-// CHECKARM: define void @_Z15test_destructorv()
+// CHECKARM-LABEL: define void @_Z15test_destructorv()
// Verify that virtual calls to destructors are not marked with a 'returned'
// this parameter at the call site...
operator int() {return 0;}
};
-// CHECK: define void @_Z1fv()
+// CHECK-LABEL: define void @_Z1fv()
void f() {
// CHECK: call void @_ZN1AIsEC1Ei
A<short> a4 = 97;
B(int);
};
- // CHECK: define void @_ZN10InitVTable1BC2Ev(%"struct.InitVTable::B"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZN10InitVTable1BC2Ev(%"struct.InitVTable::B"* %this) unnamed_addr
// CHECK: [[T0:%.*]] = bitcast [[B:%.*]]* [[THIS:%.*]] to i8***
// CHECK-NEXT: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN10InitVTable1BE, i64 0, i64 2), i8*** [[T0]]
// CHECK: [[VTBL:%.*]] = load i32 ([[B]]*)*** {{%.*}}
// CHECK-NEXT: ret void
B::B() : A(foo()) {}
- // CHECK: define void @_ZN10InitVTable1BC2Ei(%"struct.InitVTable::B"* %this, i32 %x) unnamed_addr
+ // CHECK-LABEL: define void @_ZN10InitVTable1BC2Ei(%"struct.InitVTable::B"* %this, i32 %x) unnamed_addr
// CHECK: [[ARG:%.*]] = add nsw i32 {{%.*}}, 5
// CHECK-NEXT: call void @_ZN10InitVTable1AC2Ei({{.*}}* {{%.*}}, i32 [[ARG]])
// CHECK-NEXT: [[T0:%.*]] = bitcast [[B]]* {{%.*}} to i8***
int x;
};
- // CHECK: define void @_ZN11rdar96943001fEv
+ // CHECK-LABEL: define void @_ZN11rdar96943001fEv
void f() {
// CHECK: alloca
X x;
// Make sure that the instantiated constructor initializes start and
// end properly.
-// CHECK: define linkonce_odr void @_ZN1XIiEC2ERKS0_(%struct.X* %this, %struct.X* %other) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(%struct.X* %this, %struct.X* %other) unnamed_addr
// CHECK: {{store.*null}}
// CHECK: {{store.*null}}
// CHECK: ret
// CHECK-PR10720: ret
pair2 &operator=(pair2&&) = default;
- // CHECK-PR10720: define linkonce_odr void @_ZN7PR107205pair2C2EOS0_
+ // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107205pair2C2EOS0_
// CHECK-PR10720-NOT: ret
// CHECK-PR10720: load
// CHECK-PR10720: icmp ult
// CHECK-PR10720: ret void
pair2(pair2&&) = default;
- // CHECK-PR10720: define linkonce_odr void @_ZN7PR107205pair2C2ERKS0_
+ // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107205pair2C2ERKS0_
// CHECK-PR10720-NOT: ret
// CHECK-PR10720: load
// CHECK-PR10720: icmp ult
struct pair : X { // Make the copy constructor non-trivial, so we actually generate it.
int second[4];
- // CHECK-PR10720: define linkonce_odr void @_ZN7PR107204pairC2ERKS0_
+ // CHECK-PR10720-LABEL: define linkonce_odr void @_ZN7PR107204pairC2ERKS0_
// CHECK-PR10720-NOT: ret
// CHECK-PR10720: call void @llvm.memcpy
// CHECK-PR10720-NEXT: ret void
A::A(struct Undeclared &ref) : mem(0) {}
// Check that delegation works.
-// CHECK: define void @_ZN1AC1ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC1ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
// CHECK: call void @_ZN1AC2ER10Undeclared(
-// CHECK: define void @_ZN1AC2ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC2ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
A::A(ValueClass v) : mem(v.y - v.x) {}
-// CHECK: define void @_ZN1AC1E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC1E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
// CHECK: call void @_ZN1AC2E10ValueClass(
-// CHECK: define void @_ZN1AC2E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC2E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
B::B(struct Undeclared &ref) : A(ref), mem(1) {}
-// CHECK: define void @_ZN1BC1ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BC1ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
// CHECK: call void @_ZN1BC2ER10Undeclared(
-// CHECK: define void @_ZN1BC2ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BC2ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
// CHECK: call void @_ZN1AC2ER10Undeclared(
// CHECK: call void @_ZN6MemberC1Ei(
};
C::C(int x) : A(ValueClass(x, x+1)), mem(x * x) {}
-// CHECK: define void @_ZN1CC1Ei(%struct.C* %this, i32 %x) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CC1Ei(%struct.C* %this, i32 %x) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
-// CHECK: define void @_ZN1CC2Ei(%struct.C* %this, i8** %vtt, i32 %x) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CC2Ei(%struct.C* %this, i8** %vtt, i32 %x) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
D::D(int x, ...) : A(ValueClass(x, x+1)), mem(x*x) {}
-// CHECK: define void @_ZN1DC1Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
+// CHECK-LABEL: define void @_ZN1DC1Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
-// CHECK: define void @_ZN1DC2Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
+// CHECK-LABEL: define void @_ZN1DC2Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
struct A { A(); void *ptr; };
struct B { B(); int x; A a[0]; };
B::B() {}
- // CHECK: define void @_ZN5test11BC2Ev(
+ // CHECK-LABEL: define void @_ZN5test11BC2Ev(
// CHECK: [[THIS:%.*]] = load [[B:%.*]]**
// CHECK-NEXT: ret void
}
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
struct A {};
A& (A::*x)(const A&) = &A::operator=;
-// CHECK: define linkonce_odr %struct.A* @_ZN1AaSERKS_
+// CHECK-LABEL: define linkonce_odr %struct.A* @_ZN1AaSERKS_
struct A { int x; A(int); ~A(); };
A f() { return A(0); }
-// CHECK: define void @_Z1fv
+// CHECK-LABEL: define void @_Z1fv
// CHECK: call {{.*}} @_ZN1AC1Ei
// CHECK-NEXT: ret void
static A makeA() { A a; a.value = 2; return a; }
};
- // CHECK: define i32 @_ZN7PR121394testEv
+ // CHECK-LABEL: define i32 @_ZN7PR121394testEv
int test() {
// CHECK: call void @_ZN7PR121391A5makeAEv
// CHECK-NEXT: call %"struct.PR12139::A"* @_ZN7PR121391AC1ERKS0_i
};
-// CHECK: define linkonce_odr void @_ZN1XC1ERKS_(%struct.X* %this, %struct.X*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1XC1ERKS_(%struct.X* %this, %struct.X*) unnamed_addr
struct X : M, N, P { // ...
X() : f1(1.0), d1(2.0), i1(3), name("HELLO"), bf1(0xff), bf2(0xabcd),
au_i1(1234), au1_4("MASKED") {}
// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
// CHECK-NEXT: ret [[A]]* [[THIS]]
-// CHECK: define linkonce_odr void @_ZN12rdar138169401AC2ERKS0_(
+// CHECK-LABEL: define linkonce_odr void @_ZN12rdar138169401AC2ERKS0_(
// CHECK: [[THIS:%.*]] = load [[A]]**
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[THIS]] to i8***
// CHECK-NEXT: store i8** getelementptr inbounds ([4 x i8*]* @_ZTVN12rdar138169401AE, i64 0, i64 2), i8*** [[T0]]
// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
// CHECK-NEXT: ret void
-// CHECK: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"*) unnamed_addr
// CHECK: call void @_ZN6PR66281TC1Ev
// CHECK: call void @_ZN6PR66281TC1Ev
// CHECK: call void @_ZN6PR66281AC2ERKS0_RKNS_1TES5_
void f(Foo);
-// CHECK: define void @_Z1g3Foo(%struct.Foo* %foo)
+// CHECK-LABEL: define void @_Z1g3Foo(%struct.Foo* %foo)
void g(Foo foo) {
// CHECK: call void @_ZN3BarC1Ev
// CHECK: @_ZNK3BarcvRK3FooEv
return 0;
}
-// CHECK: define internal void @__copy_helper_block_
+// CHECK-LABEL: define internal void @__copy_helper_block_
// CHECK: call void @_ZN1AC1ERKS_
-// CHECK:define internal void @__destroy_helper_block_
+// CHECK-LABEL:define internal void @__destroy_helper_block_
// CHECK: call void @_ZN1AD1Ev
virtual void squawk() { other(); }
};
- // CHECK: define void @_ZN7PR145883FooC1Ev(%"class.PR14588::Foo"*
+ // CHECK-LABEL: define void @_ZN7PR145883FooC1Ev(%"class.PR14588::Foo"*
// CHECK: call void @_ZN7PR145883FooC1EPKv(
// CHECK: invoke void @_ZN7PR145885otherEv()
// CHECK: call void @_ZN7PR145883FooD1Ev
typedef A x[];
int f() {
x{{{1}}};
- // CHECK: define i32 @_Z1fv
+ // CHECK-LABEL: define i32 @_Z1fv
// CHECK: store i32 1
// (It's okay if the output changes here, as long as we don't crash.)
return 0;
S1();
};
- // CHECK: define void @_ZN22ValueInitArrayOfMemPtr1fEi
+ // CHECK-LABEL: define void @_ZN22ValueInitArrayOfMemPtr1fEi
void f(int n) {
Agg1 a = { n };
// CHECK: store i32 -1,
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %{{.*}}, i8* bitcast ([3 x i32]* @[[THREE_NULL_MEMPTRS]] to i8*), i32 12, i32 4, i1 false)
}
- // CHECK: define void @_ZN22ValueInitArrayOfMemPtr1gEv
+ // CHECK-LABEL: define void @_ZN22ValueInitArrayOfMemPtr1gEv
void g() {
// CHECK: store i32 -1,
f(a{});
using T = S[3];
void f(const T &);
void f(T *);
- // CHECK: define void @_ZN10array_dtor1gEv(
+ // CHECK-LABEL: define void @_ZN10array_dtor1gEv(
void g() {
// CHECK: %[[ARRAY:.*]] = alloca [3 x
// CHECK: br
// CHECK: ret void
}
- // CHECK: define void @_ZN10array_dtor1hEv(
+ // CHECK-LABEL: define void @_ZN10array_dtor1hEv(
void h() {
// CHECK: %[[ARRAY:.*]] = alloca [3 x
// CHECK: br
// CHECK: ret void
}
- // CHECK: define void @_ZN10array_dtor1iEv(
+ // CHECK-LABEL: define void @_ZN10array_dtor1iEv(
void i() {
// CHECK: %[[ARRAY:.*]] = alloca [3 x
// CHECK: br
};
void fn1() {
- // CHECK: define void @_Z3fn1v
+ // CHECK-LABEL: define void @_Z3fn1v
S s { 1 };
// CHECK: alloca %struct.S, align 1
// CHECK: call void @_ZN1SC1Ei(%struct.S* %s, i32 1)
}
void fn2() {
- // CHECK: define void @_Z3fn2v
+ // CHECK-LABEL: define void @_Z3fn2v
S s { 1, 2.0, 3.0 };
// CHECK: alloca %struct.S, align 1
// CHECK: call void @_ZN1SC1Eidd(%struct.S* %s, i32 1, double 2.000000e+00, double 3.000000e+00)
}
void fn3() {
- // CHECK: define void @_Z3fn3v
+ // CHECK-LABEL: define void @_Z3fn3v
S sa[] { { 1 }, { 2 }, { 3 } };
// CHECK: alloca [3 x %struct.S], align 1
// CHECK: call void @_ZN1SC1Ei(%struct.S* %{{.+}}, i32 1)
}
void fn4() {
- // CHECK: define void @_Z3fn4v
+ // CHECK-LABEL: define void @_Z3fn4v
S sa[] { { 1, 2.0, 3.0 }, { 4, 5.0, 6.0 } };
// CHECK: alloca [2 x %struct.S], align 1
// CHECK: call void @_ZN1SC1Eidd(%struct.S* %{{.+}}, i32 1, double 2.000000e+00, double 3.000000e+00)
std::initializer_list<int> globalInitList1 = {1, 2, 3};
void fn1(int i) {
- // CHECK: define void @_Z3fn1i
+ // CHECK-LABEL: define void @_Z3fn1i
// temporary array
// CHECK: [[array:%[^ ]+]] = alloca [3 x i32]
// CHECK: getelementptr inbounds [3 x i32]* [[array]], i{{32|64}} 0
void fn2() {
- // CHECK: define void @_Z3fn2v
+ // CHECK-LABEL: define void @_Z3fn2v
void target(std::initializer_list<destroyme1>);
// objects should be destroyed before dm2, after call returns
target({ destroyme1(), destroyme1() });
}
void fn3() {
- // CHECK: define void @_Z3fn3v
+ // CHECK-LABEL: define void @_Z3fn3v
// objects should be destroyed after dm2
auto list = { destroyme1(), destroyme1() };
destroyme2 dm2;
// thread_local initializer:
-// CHECK: define internal void
+// CHECK-LABEL: define internal void
// CHECK: store i32* getelementptr inbounds ([4 x i32]* @_ZGRN25thread_local_global_array1xE, i64 0, i64 0),
// CHECK: i32** getelementptr inbounds ({{.*}}* @_ZN25thread_local_global_array1xE, i32 0, i32 0), align 8
// CHECK: store i64 4, i64* getelementptr inbounds ({{.*}}* @_ZN25thread_local_global_array1xE, i32 0, i32 1), align 8
-// CHECK: define internal void
+// CHECK-LABEL: define internal void
// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2, i{{32|64}} 0, i{{32|64}} 0
// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2, i{{32|64}} 0, i{{32|64}} 1
// CHECK: __cxa_atexit
};
void fn1(int i) {
- // CHECK: define void @_Z3fn1i
+ // CHECK-LABEL: define void @_Z3fn1i
// temporary array
// CHECK: [[array:%[^ ]+]] = alloca [3 x i32]
// CHECK: getelementptr inbounds [3 x i32]* [[array]], i{{32|64}} 0
}
void fn2() {
- // CHECK: define void @_Z3fn2v
+ // CHECK-LABEL: define void @_Z3fn2v
void target(std::initializer_list<destroyme1>);
// objects should be destroyed before dm2, after call returns
// CHECK: call void @_Z6targetSt16initializer_listI10destroyme1E
}
void fn3() {
- // CHECK: define void @_Z3fn3v
+ // CHECK-LABEL: define void @_Z3fn3v
// objects should be destroyed after dm2
auto list = { destroyme1(), destroyme1() };
destroyme2 dm2;
}
void fn4() {
- // CHECK: define void @_Z3fn4v
+ // CHECK-LABEL: define void @_Z3fn4v
void target(std::initializer_list<witharg1>);
// objects should be destroyed before dm2, after call returns
// CHECK: call void @_ZN8witharg1C1ERK10destroyme1
}
void fn5() {
- // CHECK: define void @_Z3fn5v
+ // CHECK-LABEL: define void @_Z3fn5v
// temps should be destroyed before dm2
// objects should be destroyed after dm2
// CHECK: call void @_ZN8witharg1C1ERK10destroyme1
}
void fn6() {
- // CHECK: define void @_Z3fn6v
+ // CHECK-LABEL: define void @_Z3fn6v
void target(const wantslist1&);
// objects should be destroyed before dm2, after call returns
// CHECK: call void @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E
}
void fn7() {
- // CHECK: define void @_Z3fn7v
+ // CHECK-LABEL: define void @_Z3fn7v
// temps should be destroyed before dm2
// object should be destroyed after dm2
// CHECK: call void @_ZN10wantslist1C1ESt16initializer_listI10destroyme1E
}
void fn8() {
- // CHECK: define void @_Z3fn8v
+ // CHECK-LABEL: define void @_Z3fn8v
void target(std::initializer_list<std::initializer_list<destroyme1>>);
// objects should be destroyed before dm2, after call returns
// CHECK: call void @_Z6targetSt16initializer_listIS_I10destroyme1EE
}
void fn9() {
- // CHECK: define void @_Z3fn9v
+ // CHECK-LABEL: define void @_Z3fn9v
// objects should be destroyed after dm2
std::initializer_list<destroyme1> inner;
std::initializer_list<std::initializer_list<destroyme1>> list =
haslist1();
};
-// CHECK: define void @_ZN8haslist1C2Ev
+// CHECK-LABEL: define void @_ZN8haslist1C2Ev
haslist1::haslist1()
// CHECK: alloca [3 x i32]
// CHECK: store i32 1
haslist2();
};
-// CHECK: define void @_ZN8haslist2C2Ev
+// CHECK-LABEL: define void @_ZN8haslist2C2Ev
haslist2::haslist2()
: il{destroyme1(), destroyme1()}
{
}
void fn10() {
- // CHECK: define void @_Z4fn10v
+ // CHECK-LABEL: define void @_Z4fn10v
// CHECK: alloca [3 x i32]
// CHECK: call noalias i8* @_Znw{{[jm]}}
// CHECK: store i32 1
}
void fn11() {
- // CHECK: define void @_Z4fn11v
+ // CHECK-LABEL: define void @_Z4fn11v
(void) new std::initializer_list<destroyme1> {destroyme1(), destroyme1()};
// CHECK: call void @_ZN10destroyme1D1Ev
destroyme2 dm2;
namespace rdar13325066 {
struct X { ~X(); };
- // CHECK: define void @_ZN12rdar133250664loopERNS_1XES1_
+ // CHECK-LABEL: define void @_ZN12rdar133250664loopERNS_1XES1_
void loop(X &x1, X &x2) {
// CHECK: br label
// CHECK: br i1
};
void z();
- // CHECK: define void @_ZN5dtors1fEv(
+ // CHECK-LABEL: define void @_ZN5dtors1fEv(
void f() {
// CHECK: call void @_ZN5dtors1SC1Ev(
// CHECK: call void @_ZN5dtors1SC1Ev(
// CHECK-NOT: call void @_ZN5dtors1SD1Ev(
}
- // CHECK: define void @_ZN5dtors1gEv(
+ // CHECK-LABEL: define void @_ZN5dtors1gEv(
void g() {
// CHECK: call void @_ZN5dtors1SC1Ev(
// CHECK: call void @_ZN5dtors1SC1Ev(
// CHECK-NOT: call void @_ZN5dtors1SD1Ev(
}
- // CHECK: define void @_ZN5dtors1hEv(
+ // CHECK-LABEL: define void @_ZN5dtors1hEv(
void h() {
// CHECK: call void @_ZN5dtors1SC1Ev(
// CHECK: call void @_ZN5dtors1SC1Ev(
struct B { const A &a; ~B(); };
struct C { std::initializer_list<B> b; ~C(); };
void f();
- // CHECK: define void @_ZN6nested1gEv(
+ // CHECK-LABEL: define void @_ZN6nested1gEv(
void g() {
// CHECK: call void @_ZN6nested1AC1Ev(
// CHECK-NOT: call
// CHECK: call i32* @_Z1fv()
// CHECK: store i32* %{{.*}}, i32** @r, align 8
-// CHECK: define i32* @_Z1gv()
+// CHECK-LABEL: define i32* @_Z1gv()
// CHECK: call i32* @_ZTW1r()
// CHECK: ret i32* %{{.*}}
// CHECK: load i32** @r, align 8
// CHECK: ret i32* %{{.*}}
-// CHECK: define internal void @__tls_init()
+// CHECK-LABEL: define internal void @__tls_init()
// CHECK: call void @[[R_INIT]]()
// CHECK: call i32 @_Z1fv()
// CHECK-NEXT: store i32 {{.*}}, i32* @a, align 4
-// CHECK: define i32 @_Z1fv()
+// CHECK-LABEL: define i32 @_Z1fv()
int f() {
// CHECK: %[[GUARD:.*]] = load i8* @_ZGVZ1fvE1n, align 1
// CHECK: %[[NEED_INIT:.*]] = icmp eq i8 %[[GUARD]], 0
// CHECK-NEXT: load i32* %{{.*}}, align 4
// CHECK-NEXT: store i32 %{{.*}}, i32* @c, align 4
-// CHECK: define weak_odr hidden i32* @_ZTW1b()
+// CHECK-LABEL: define weak_odr hidden i32* @_ZTW1b()
// CHECK: br i1 icmp ne (void ()* @_ZTH1b, void ()* null),
// not null:
// CHECK: call void @_ZTH1b()
// CHECK-NEXT: load i32* %{{.*}}, align 4
// CHECK-NEXT: store i32 %{{.*}}, i32* @e, align 4
-// CHECK: define weak_odr hidden i32* @_ZTWN1VIiE1mE()
+// CHECK-LABEL: define weak_odr hidden i32* @_ZTWN1VIiE1mE()
// CHECK: call void @_ZTHN1VIiE1mE()
// CHECK: ret i32* @_ZN1VIiE1mE
struct S { S(); ~S(); };
struct T { ~T(); };
-// CHECK: define void @_Z8tls_dtorv()
+// CHECK-LABEL: define void @_Z8tls_dtorv()
void tls_dtor() {
// CHECK: load i8* @_ZGVZ8tls_dtorvE1s
// CHECK: call void @_ZN1SC1Ev(%struct.S* @_ZZ8tls_dtorvE1s)
// CHECK: declare extern_weak void @_ZTH1b()
-// CHECK: define internal hidden i32* @_ZTWL1d()
+// CHECK-LABEL: define internal hidden i32* @_ZTWL1d()
// CHECK: call void @_ZTHL1d()
// CHECK: ret i32* @_ZL1d
-// CHECK: define weak_odr hidden i32* @_ZTWN1U1mE()
+// CHECK-LABEL: define weak_odr hidden i32* @_ZTWN1U1mE()
// CHECK: call void @_ZTHN1U1mE()
// CHECK: ret i32* @_ZN1U1mE
int main(void) {}
-// CHECK: define internal void @__cxx_global_var_init()
+// CHECK-LABEL: define internal void @__cxx_global_var_init()
// CHECK-NOT: __cxx_global_var_init
// CHECK: %[[C0:.+]] = call i32 @_Z4testv(), !dbg ![[LINE:.*]]
// CHECK-NOT: __cxx_global_var_init
// CHECK: store i32 %[[C0]], i32* @_ZL1i, align 4, !dbg
//
-// CHECK: define internal void @__cxx_global_var_init1()
+// CHECK-LABEL: define internal void @__cxx_global_var_init1()
// CHECK-NOT: dbg
// CHECK: %[[C1:.+]] = call i32 @_Z4testv()
// CHECK-NOT: dbg
X(const X&, const T& t = T());
};
-// CHECK: define void @_Z1gv()
+// CHECK-LABEL: define void @_Z1gv()
void g() {
// CHECK: call void @_ZN1TC1Ev([[T:%.*]]* [[AGG1:%.*]])
// CHECK-NEXT: call void @_Z1fRK1T([[T]]* [[AGG1]])
class obj{ int a; float b; double d; };
-// CHECK: define void @_Z1hv()
+// CHECK-LABEL: define void @_Z1hv()
void h() {
// CHECK: call void @llvm.memset.p0i8.i64(
obj o = obj();
C c;
A a;
- // CHECK: define linkonce_odr void @_ZN5test11DC2Ev(%"struct.test1::D"* %this) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test11DC2Ev(%"struct.test1::D"* %this) unnamed_addr
// CHECK: call void @_ZN5test11BC1Ev(
// CHECK-NEXT: call void @_ZN5test11CC1ERKNS_1BE(
// CHECK-NEXT: call void @_ZN5test11BD1Ev(
B(const A1& = A1(), const A2& = A2());
};
-// CHECK: define void @_Z2f1v()
+// CHECK-LABEL: define void @_Z2f1v()
void f1() {
// CHECK: call void @_ZN2A1C1Ev(
C();
};
-// CHECK: define void @_ZN1CC1Ev(%struct.C* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CC1Ev(%struct.C* %this) unnamed_addr
// CHECK: call void @_ZN1CC2Ev(
-// CHECK: define void @_ZN1CC2Ev(%struct.C* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CC2Ev(%struct.C* %this) unnamed_addr
// CHECK: call void @_ZN2A1C1Ev(
// CHECK: call void @_ZN2A2C1Ev(
// CHECK: call void @_ZN1BC1ERK2A1RK2A2(
// CHECK: call void @_ZN2A1D1Ev
C::C() { }
-// CHECK: define void @_Z2f3v()
+// CHECK-LABEL: define void @_Z2f3v()
void f3() {
// CHECK: call void @_ZN2A1C1Ev(
// CHECK: call void @_ZN2A2C1Ev(
// CHECK: @_ZL1a = internal global i8* null
-// CHECK: define internal void @__cxx_global_var_init
+// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: load i8** @foo
// CHECK: ret void
-// CHECK: define internal void @_GLOBAL__I_a
+// CHECK-LABEL: define internal void @_GLOBAL__I_a
// CHECK: call void @__cxx_global_var_init()
// CHECK: ret void
namespace test1 {
struct A { void operator delete(void*,size_t); int x; };
- // CHECK: define void @_ZN5test11aEPNS_1AE(
+ // CHECK-LABEL: define void @_ZN5test11aEPNS_1AE(
void a(A *x) {
// CHECK: load
// CHECK-NEXT: icmp eq {{.*}}, null
return ::new A[10];
}
- // CHECK: define void @_ZN5test24testEPNS_1AE(
+ // CHECK-LABEL: define void @_ZN5test24testEPNS_1AE(
void test(A *p) {
// CHECK: [[P:%.*]] = alloca [[A]]*, align 4
// CHECK-NEXT: store [[A]]* {{%.*}}, [[A]]** [[P]], align 4
};
struct B : A {};
- // CHECK: define void @_ZN5test34testEv()
+ // CHECK-LABEL: define void @_ZN5test34testEv()
void test() {
// CHECK: call noalias i8* @_Znaj(i32 24)
// CHECK-NEXT: bitcast
int a;
};
-// CHECK: define void @_Z2t4P1T
+// CHECK-LABEL: define void @_Z2t4P1T
void t4(T *t) {
// CHECK: call void @_ZN1TD1Ev
// CHECK-NEXT: bitcast
~A() {}
};
- // CHECK: define void @_ZN5test04testEPNS_1AE(
+ // CHECK-LABEL: define void @_ZN5test04testEPNS_1AE(
void test(A *a) {
// CHECK: call void @_ZN5test01AD1Ev
// CHECK-NEXT: bitcast
delete a;
}
- // CHECK: define linkonce_odr void @_ZN5test01AD1Ev(%"struct.test0::A"* %this) unnamed_addr
- // CHECK: define linkonce_odr void @_ZN5test01AdlEPv
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01AD1Ev(%"struct.test0::A"* %this) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01AdlEPv
}
namespace test1 {
~A();
};
- // CHECK: define void @_ZN5test14testEPA10_A20_NS_1AE(
+ // CHECK-LABEL: define void @_ZN5test14testEPA10_A20_NS_1AE(
void test(A (*arr)[10][20]) {
delete [] arr;
// CHECK: icmp eq [10 x [20 x [[A:%.*]]]]* [[PTR:%.*]], null
}
namespace test2 {
- // CHECK: define void @_ZN5test21fEPb
+ // CHECK-LABEL: define void @_ZN5test21fEPb
void f(bool *b) {
// CHECK: call void @_ZdlPv(i8*
delete b;
void operator delete (void *);
};
- // CHECK: define void @_ZN5test421global_delete_virtualEPNS_1XE
+ // CHECK-LABEL: define void @_ZN5test421global_delete_virtualEPNS_1XE
void global_delete_virtual(X *xp) {
// Load the offset-to-top from the vtable and apply it.
// This has to be done first because the dtor can mess it up.
namespace test5 {
struct Incomplete;
- // CHECK: define void @_ZN5test523array_delete_incompleteEPNS_10IncompleteES1_
+ // CHECK-LABEL: define void @_ZN5test523array_delete_incompleteEPNS_10IncompleteES1_
void array_delete_incomplete(Incomplete *p1, Incomplete *p2) {
// CHECK: call void @_ZdlPv
delete p1;
void test0_helper(A);
void test0(X x) {
test0_helper(x);
- // CHECK: define void @_Z5test01X(
+ // CHECK-LABEL: define void @_Z5test01X(
// CHECK: [[TMP:%.*]] = alloca [[A:%.*]], align
// CHECK-NEXT: [[T0:%.*]] = call [[B:%.*]]* @_ZN1XcvR1BEv(
// CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]* [[T0]] to [[A]]*
void test1_helper(Base);
void test1(Derived bb) {
- // CHECK: define void @_Z5test17Derived(
+ // CHECK-LABEL: define void @_Z5test17Derived(
// CHECK-NOT: call {{.*}} @_ZN4BasecvR7DerivedEv(
// CHECK: call void @_ZN4BaseC1ERKS_(
// CHECK-NOT: call {{.*}} @_ZN4BasecvR7DerivedEv(
class Test2b final : public virtual Test2a {};
void test2(Test2b &x) {
Test2a &y = x;
- // CHECK: define void @_Z5test2R6Test2b(
+ // CHECK-LABEL: define void @_Z5test2R6Test2b(
// CHECK: [[X:%.*]] = alloca [[B:%.*]]*, align 8
// CHECK-NEXT: [[Y:%.*]] = alloca [[A:%.*]]*, align 8
// CHECK-NEXT: store [[B]]* {{%.*}}, [[B]]** [[X]], align 8
virtual void f();
};
-// CHECK: define %struct.B* @_Z1fR1D
+// CHECK-LABEL: define %struct.B* @_Z1fR1D
B &f(D &d) {
// CHECK-NOT: load i8**
return d;
struct allocator_derived : allocator { };
- // CHECK: define void @_ZN6PR75269allocatorD2Ev(%"struct.PR7526::allocator"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZN6PR75269allocatorD2Ev(%"struct.PR7526::allocator"* %this) unnamed_addr
// CHECK: call void @__cxa_call_unexpected
allocator::~allocator() throw() { foo(); }
- // CHECK: define linkonce_odr void @_ZN6PR752617allocator_derivedD1Ev(%"struct.PR7526::allocator_derived"* %this) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr void @_ZN6PR752617allocator_derivedD1Ev(%"struct.PR7526::allocator_derived"* %this) unnamed_addr
// CHECK-NOT: call void @__cxa_call_unexpected
// CHECK: }
void foo() {
// complete destructor alias tested above
-// CHECK: define void @_ZN5test01AD2Ev(%"struct.test0::A"* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN5test01AD2Ev(%"struct.test0::A"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test06MemberD1Ev
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
// CHECK: invoke void @_ZN5test04BaseD2Ev
B::~B() try { } catch (int i) {}
// It will suppress the delegation optimization here, though.
-// CHECK: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test06MemberD1Ev
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
// CHECK: invoke void @_ZN5test04BaseD2Ev
// CHECK: invoke void @_ZN5test05VBaseD2Ev
// CHECK: unwind label [[VBASE_UNWIND:%[a-zA-Z0-9.]+]]
-// CHECK: define void @_ZN5test01BD2Ev(%"struct.test0::B"* %this, i8** %vtt) unnamed_addr
+// CHECK-LABEL: define void @_ZN5test01BD2Ev(%"struct.test0::B"* %this, i8** %vtt) unnamed_addr
// CHECK: invoke void @_ZN5test06MemberD1Ev
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
// CHECK: invoke void @_ZN5test04BaseD2Ev
O::~O() {} // alias tested above
struct P : NonEmpty, A { ~P(); };
- P::~P() {} // CHECK: define void @_ZN5test11PD2Ev(%"struct.test1::P"* %this) unnamed_addr
+ P::~P() {} // CHECK-LABEL: define void @_ZN5test11PD2Ev(%"struct.test1::P"* %this) unnamed_addr
struct Q : A, B { ~Q(); };
- Q::~Q() {} // CHECK: define void @_ZN5test11QD2Ev(%"struct.test1::Q"* %this) unnamed_addr
+ Q::~Q() {} // CHECK-LABEL: define void @_ZN5test11QD2Ev(%"struct.test1::Q"* %this) unnamed_addr
struct R : A { ~R(); };
- R::~R() { A a; } // CHECK: define void @_ZN5test11RD2Ev(%"struct.test1::R"* %this) unnamed_addr
+ R::~R() { A a; } // CHECK-LABEL: define void @_ZN5test11RD2Ev(%"struct.test1::R"* %this) unnamed_addr
struct S : A { ~S(); int x; };
S::~S() {} // alias tested above
struct T : A { ~T(); B x; };
- T::~T() {} // CHECK: define void @_ZN5test11TD2Ev(%"struct.test1::T"* %this) unnamed_addr
+ T::~T() {} // CHECK-LABEL: define void @_ZN5test11TD2Ev(%"struct.test1::T"* %this) unnamed_addr
// The VTT parameter prevents this. We could still make this work
// for calling conventions that are safe against extra parameters.
struct U : A, virtual B { ~U(); };
- U::~U() {} // CHECK: define void @_ZN5test11UD2Ev(%"struct.test1::U"* %this, i8** %vtt) unnamed_addr
+ U::~U() {} // CHECK-LABEL: define void @_ZN5test11UD2Ev(%"struct.test1::U"* %this, i8** %vtt) unnamed_addr
}
// PR6471
struct B : A { ~B(); };
B::~B() {}
- // CHECK: define void @_ZN5test21BD2Ev(%"struct.test2::B"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZN5test21BD2Ev(%"struct.test2::B"* %this) unnamed_addr
// CHECK: call void @_ZN5test21AD2Ev
}
namespace test4 {
struct A { ~A(); };
- // CHECK: define void @_ZN5test43fooEv()
+ // CHECK-LABEL: define void @_ZN5test43fooEv()
// CHECK: call void @_ZN5test41AD1Ev
// CHECK: ret void
void foo() {
return;
}
- // CHECK: define void @_ZN5test43barEi(
+ // CHECK-LABEL: define void @_ZN5test43barEi(
// CHECK: [[X:%.*]] = alloca i32
// CHECK-NEXT: [[A:%.*]] = alloca
// CHECK: br label
namespace test5 {
struct A { ~A(); };
- // CHECK: define void @_ZN5test53fooEv()
+ // CHECK-LABEL: define void @_ZN5test53fooEv()
// CHECK: [[ELEMS:%.*]] = alloca [5 x [[A:%.*]]], align
// CHECK-NEXT: [[EXN:%.*]] = alloca i8*
// CHECK-NEXT: [[SEL:%.*]] = alloca i32
};
C::C() { opaque(); }
- // CHECK: define void @_ZN5test61CC1Ev(%"struct.test6::C"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZN5test61CC1Ev(%"struct.test6::C"* %this) unnamed_addr
// CHECK: call void @_ZN5test61BILj2EEC2Ev
// CHECK: invoke void @_ZN5test61BILj3EEC2Ev
// CHECK: invoke void @_ZN5test61BILj0EEC2Ev
// FIXME: way too much EH cleanup code follows
C::~C() { opaque(); }
- // CHECK: define void @_ZN5test61CD1Ev(%"struct.test6::C"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZN5test61CD1Ev(%"struct.test6::C"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test61CD2Ev
// CHECK: invoke void @_ZN5test61BILj3EED2Ev
// CHECK: call void @_ZN5test61BILj2EED2Ev
// CHECK: invoke void @_ZN5test61BILj3EED2Ev
// CHECK: invoke void @_ZN5test61BILj2EED2Ev
- // CHECK: define void @_ZN5test61CD2Ev(%"struct.test6::C"* %this, i8** %vtt) unnamed_addr
+ // CHECK-LABEL: define void @_ZN5test61CD2Ev(%"struct.test6::C"* %this, i8** %vtt) unnamed_addr
// CHECK: invoke void @_ZN5test66opaqueEv
// CHECK: invoke void @_ZN5test61AD1Ev
// CHECK: invoke void @_ZN5test61AD1Ev
};
// Verify that this doesn't get emitted as an alias
- // CHECK: define void @_ZN5test71BD2Ev(
+ // CHECK-LABEL: define void @_ZN5test71BD2Ev(
// CHECK: invoke void @_ZN5test71DD1Ev(
// CHECK: call void @_ZN5test71AD2Ev(
B::~B() {}
l: die();
}
- // CHECK: define void @_ZN5test84testEv()
+ // CHECK-LABEL: define void @_ZN5test84testEv()
// CHECK: [[X:%.*]] = alloca [[A:%.*]], align 1
// CHECK-NEXT: [[Y:%.*]] = alloca [[A:%.*]], align 1
// CHECK: call void @_ZN5test81AC1Ev([[A]]* [[X]])
// Checks from test3:
- // CHECK: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::<anonymous namespace>::D"* %this) unnamed_addr
+ // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::<anonymous namespace>::D"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test312_GLOBAL__N_11DD1Ev(
// CHECK: call void @_ZdlPv({{.*}}) [[NUW:#[0-9]+]]
// CHECK: ret void
// @_ZN5test312_GLOBAL__N_11DD1Ev = alias internal {{.*}} @_ZN5test312_GLOBAL__N_11DD2Ev
// @_ZN5test312_GLOBAL__N_11DD2Ev = alias internal bitcast {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
- // CHECK: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD1Ev(
+ // CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD1Ev(
// CHECK: getelementptr inbounds i8* {{.*}}, i64 -8
// CHECK: call void @_ZN5test312_GLOBAL__N_11DD1Ev(
// CHECK: ret void
- // CHECK: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD0Ev(
+ // CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD0Ev(
// CHECK: getelementptr inbounds i8* {{.*}}, i64 -8
// CHECK: call void @_ZN5test312_GLOBAL__N_11DD0Ev(
// CHECK: ret void
- // CHECK: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
+ // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test31BD2Ev(
// CHECK: call void @_ZN5test31AD2Ev(
// CHECK: ret void
// CHECK: declare void @_ZN5test31BD2Ev(
// CHECK: declare void @_ZN5test31AD2Ev(
- // CHECK: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
+ // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test312_GLOBAL__N_11CD1Ev(
// CHECK: call void @_ZdlPv({{.*}}) [[NUW]]
// CHECK: ret void
// CHECK: call void @_ZdlPv({{.*}}) [[NUW]]
// CHECK: resume { i8*, i32 }
- // CHECK: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev(
+ // CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev(
// CHECK: getelementptr inbounds i8* {{.*}}, i64 -8
// CHECK: call void @_ZN5test312_GLOBAL__N_11CD1Ev(
// CHECK: ret void
- // CHECK: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD0Ev(
+ // CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD0Ev(
// CHECK: getelementptr inbounds i8* {{.*}}, i64 -8
// CHECK: call void @_ZN5test312_GLOBAL__N_11CD0Ev(
// CHECK: ret void
virtual int f() final;
};
- // CHECK: define i32 @_ZN5Test11fEPNS_1AE
+ // CHECK-LABEL: define i32 @_ZN5Test11fEPNS_1AE
int f(A *a) {
// CHECK: call i32 @_ZN5Test11A1fEv
return a->f();
virtual int f();
};
- // CHECK: define i32 @_ZN5Test21fEPNS_1AE
+ // CHECK-LABEL: define i32 @_ZN5Test21fEPNS_1AE
int f(A *a) {
// CHECK: call i32 @_ZN5Test21A1fEv
return a->f();
struct B final : A { };
- // CHECK: define i32 @_ZN5Test31fEPNS_1BE
+ // CHECK-LABEL: define i32 @_ZN5Test31fEPNS_1BE
int f(B *b) {
// CHECK: call i32 @_ZN5Test31A1fEv
return b->f();
}
- // CHECK: define i32 @_ZN5Test31fERNS_1BE
+ // CHECK-LABEL: define i32 @_ZN5Test31fERNS_1BE
int f(B &b) {
// CHECK: call i32 @_ZN5Test31A1fEv
return b.f();
}
- // CHECK: define i32 @_ZN5Test31fEPv
+ // CHECK-LABEL: define i32 @_ZN5Test31fEPv
int f(void *v) {
// CHECK: call i32 @_ZN5Test31A1fEv
return static_cast<B*>(v)->f();
virtual void f();
};
- // CHECK: define void @_ZN5Test41fEPNS_1BE
+ // CHECK-LABEL: define void @_ZN5Test41fEPNS_1BE
void f(B* d) {
// CHECK: call void @_ZN5Test41B1fEv
static_cast<A*>(d)->f();
struct C final : B {
};
- // CHECK: define void @_ZN5Test51fEPNS_1CE
+ // CHECK-LABEL: define void @_ZN5Test51fEPNS_1CE
void f(C* d) {
// FIXME: It should be possible to devirtualize this case, but that is
// not implemented yet.
struct D final : public C, public B {
};
- // CHECK: define void @_ZN5Test61fEPNS_1DE
+ // CHECK-LABEL: define void @_ZN5Test61fEPNS_1DE
void f(D* d) {
// CHECK: call void @_ZN5Test61DD1Ev
static_cast<A*>(d)->~A();
virtual int f() {return z;}
};
- // CHECK: define i32 @_ZN5Test71fEPNS_3zedE
+ // CHECK-LABEL: define i32 @_ZN5Test71fEPNS_3zedE
int f(zed *z) {
// CHECK: alloca
// CHECK-NEXT: store
virtual int foo() { return b; }
};
struct C final : A, B { };
- // CHECK: define i32 @_ZN5Test84testEPNS_1CE
+ // CHECK-LABEL: define i32 @_ZN5Test84testEPNS_1CE
int test(C *c) {
// CHECK: %[[THIS:.*]] = phi
// CHECK-NEXT: call i32 @_ZN5Test81B3fooEv(%"struct.Test8::B"* %[[THIS]])
struct D : public B {
};
void f(D d) {
- // CHECK: define void @_ZN5test31fENS_1DE
+ // CHECK-LABEL: define void @_ZN5test31fENS_1DE
d.B::~B();
}
}
// does not use runtime support.
A *upcast(B *b) {
return dynamic_cast<A *>(b);
-// CHECK: define %struct.A* @_Z6upcastP1B
+// CHECK-LABEL: define %struct.A* @_Z6upcastP1B
// CHECK-NOT: call i8* @__dynamic_cast
}
// runtime support.
B *samecast(B *b) {
return dynamic_cast<B *>(b);
-// CHECK: define %struct.B* @_Z8samecastP1B
+// CHECK-LABEL: define %struct.B* @_Z8samecastP1B
// CHECK-NOT: call i8* @__dynamic_cast
}
throw d1;
}
-// CHECK: define void @_Z5test1v()
+// CHECK-LABEL: define void @_Z5test1v()
// CHECK: [[EXNOBJ:%.*]] = call i8* @__cxa_allocate_exception(i64 8)
// CHECK-NEXT: [[EXN:%.*]] = bitcast i8* [[EXNOBJ]] to [[DSTAR:%[^*]*\*]]
// CHECK-NEXT: [[EXN2:%.*]] = bitcast [[DSTAR]] [[EXN]] to i8*
throw d2;
}
-// CHECK: define void @_Z5test2v()
+// CHECK-LABEL: define void @_Z5test2v()
// CHECK: [[EXNVAR:%.*]] = alloca i8*
// CHECK-NEXT: [[SELECTORVAR:%.*]] = alloca i32
// CHECK-NEXT: [[EXNOBJ:%.*]] = call i8* @__cxa_allocate_exception(i64 16)
throw (volatile test3_D *)0;
}
-// CHECK: define void @_Z5test3v()
+// CHECK-LABEL: define void @_Z5test3v()
// CHECK: [[EXNOBJ:%.*]] = call i8* @__cxa_allocate_exception(i64 8)
// CHECK-NEXT: [[EXN:%.*]] = bitcast i8* [[EXNOBJ]] to [[D:%[^*]+]]**
// CHECK-NEXT: store [[D]]* null, [[D]]** [[EXN]]
throw;
}
-// CHECK: define void @_Z5test4v()
+// CHECK-LABEL: define void @_Z5test4v()
// CHECK: call void @__cxa_rethrow() [[NR]]
// CHECK-NEXT: unreachable
void test() {
try { throw A(); } catch (A &x) {}
}
-// CHECK: define void @_ZN5test54testEv()
+// CHECK-LABEL: define void @_ZN5test54testEv()
// CHECK: [[EXNOBJ:%.*]] = call i8* @__cxa_allocate_exception(i64 1)
// CHECK: [[EXNCAST:%.*]] = bitcast i8* [[EXNOBJ]] to [[A:%[^*]*]]*
// CHECK-NEXT: invoke void @_ZN5test51AC1Ev([[A]]* [[EXNCAST]])
// PR7127
namespace test7 {
-// CHECK: define i32 @_ZN5test73fooEv()
+// CHECK-LABEL: define i32 @_ZN5test73fooEv()
int foo() {
// CHECK: [[CAUGHTEXNVAR:%.*]] = alloca i8*
// CHECK-NEXT: [[SELECTORVAR:%.*]] = alloca i32
struct A { A(const A&); ~A(); };
void bar();
- // CHECK: define void @_ZN5test83fooEv()
+ // CHECK-LABEL: define void @_ZN5test83fooEv()
void foo() {
try {
// CHECK: invoke void @_ZN5test83barEv()
struct A { A(); };
- // CHECK: define void @_ZN5test91AC1Ev(%"struct.test9::A"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZN5test91AC1Ev(%"struct.test9::A"* %this) unnamed_addr
// CHECK: call void @_ZN5test91AC2Ev
// CHECK-NEXT: ret void
- // CHECK: define void @_ZN5test91AC2Ev(%"struct.test9::A"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZN5test91AC2Ev(%"struct.test9::A"* %this) unnamed_addr
A::A() try {
// CHECK: invoke void @_ZN5test96opaqueEv()
opaque();
struct A { ~A(); };
struct B { int x; };
- // CHECK: define void @_ZN6test103fooEv()
+ // CHECK-LABEL: define void @_ZN6test103fooEv()
void foo() {
A a; // force a cleanup context
namespace test11 {
void opaque();
- // CHECK: define void @_ZN6test113fooEv()
+ // CHECK-LABEL: define void @_ZN6test113fooEv()
void foo() {
try {
// CHECK: invoke void @_ZN6test116opaqueEv()
struct A {};
- // CHECK: define void @_ZN6test113barEv()
+ // CHECK-LABEL: define void @_ZN6test113barEv()
void bar() {
try {
// CHECK: [[EXNSLOT:%.*]] = alloca i8*
struct A { ~A() noexcept(false); };
bool opaque(const A&);
- // CHECK: define void @_ZN6test124testEv()
+ // CHECK-LABEL: define void @_ZN6test124testEv()
void test() {
// CHECK: [[X:%.*]] = alloca [[A:%.*]],
// CHECK: [[EHCLEANUPDEST:%.*]] = alloca i32
bool opaque(int);
- // CHECK: define void @_ZN6test153fooEv()
+ // CHECK-LABEL: define void @_ZN6test153fooEv()
void foo() {
A a;
void foo();
bool cond();
- // CHECK: define void @_ZN6test163barEv()
+ // CHECK-LABEL: define void @_ZN6test163barEv()
void bar() {
// CHECK: [[EXN_SAVE:%.*]] = alloca i8*
// CHECK-NEXT: [[EXN_ACTIVE:%.*]] = alloca i1
#define CHECK(x) if (!(x)) return __LINE__
// PR7012
-// CHECK: define i32 @_Z1fv()
+// CHECK-LABEL: define i32 @_Z1fv()
int f() {
B b1;
void foo();
- // CHECK: define void @_ZN5test54testEv()
+ // CHECK-LABEL: define void @_ZN5test54testEv()
// CHECK: [[EXNSLOT:%.*]] = alloca i8*
// CHECK-NEXT: [[SELECTORSLOT:%.*]] = alloca i32
// CHECK-NEXT: [[A:%.*]] = alloca [[A_T:%.*]], align 1
void test() {
throw makeA();
}
- // CHECK: define void @_ZN5test84testEv
+ // CHECK-LABEL: define void @_ZN5test84testEv
}
// Make sure we generate the correct code for the delete[] call which
struct A { ~A(); };
A::~A() try { cleanup(); } catch (...) { return; }
- // CHECK: define void @_ZN6test101AD1Ev(
+ // CHECK-LABEL: define void @_ZN6test101AD1Ev(
// CHECK: invoke void @_ZN6test107cleanupEv()
// CHECK-NOT: rethrow
// CHECK: ret void
struct B { ~B(); };
B::~B() try { cleanup(); } catch (...) {}
- // CHECK: define void @_ZN6test101BD1Ev(
+ // CHECK-LABEL: define void @_ZN6test101BD1Ev(
// CHECK: invoke void @_ZN6test107cleanupEv()
// CHECK: call i8* @__cxa_begin_catch
// CHECK-NEXT: invoke void @__cxa_rethrow()
struct C { ~C(); };
C::~C() try { cleanup(); } catch (...) { if (suppress) return; }
- // CHECK: define void @_ZN6test101CD1Ev(
+ // CHECK-LABEL: define void @_ZN6test101CD1Ev(
// CHECK: invoke void @_ZN6test107cleanupEv()
// CHECK: call i8* @__cxa_begin_catch
// CHECK-NEXT: load i8* @_ZN6test108suppressE, align 1
C::C() {
throw 0;
}
- // CHECK: define void @_ZN6test111CC2Ev(
+ // CHECK-LABEL: define void @_ZN6test111CC2Ev(
// CHECK: [[THIS:%.*]] = load [[C:%.*]]** {{%.*}}
// Construct single.
// CHECK-NEXT: [[SINGLE:%.*]] = getelementptr inbounds [[C]]* [[THIS]], i32 0, i32 0
return t + u;
}
-// CHECK: define weak_odr i32 @_ZNK4plusIillEclERKiRKl
+// CHECK-LABEL: define weak_odr i32 @_ZNK4plusIillEclERKiRKl
template struct plus<int, long, long>;
// Check that we emit definitions from explicit instantiations even when they
};
};
-// CHECK: define weak_odr void @_ZN1SIiE1fEv
+// CHECK-LABEL: define weak_odr void @_ZN1SIiE1fEv
template void S<int>::f();
-// CHECK: define weak_odr void @_ZN1SIiE1gEv
+// CHECK-LABEL: define weak_odr void @_ZN1SIiE1gEv
template void S<int>::g();
// See the check line at the top of the file.
template int S<int>::i;
-// CHECK: define weak_odr void @_ZN1SIiE2S21hEv
+// CHECK-LABEL: define weak_odr void @_ZN1SIiE2S21hEv
template void S<int>::S2::h();
template <typename T> void S<T>::f() {}
void __attribute__((fastcall)) foo1(int &y);
void bar1(int &y) {
- // CHECK: define void @_Z4bar1Ri
+ // CHECK-LABEL: define void @_Z4bar1Ri
// CHECK: call x86_fastcallcc void @_Z4foo1Ri(i32* inreg %
foo1(y);
}
void __attribute__((fastcall)) foo2(S1 a, int b);
void bar2(S1 a, int b) {
- // CHECK: define void @_Z4bar22S1i
+ // CHECK-LABEL: define void @_Z4bar22S1i
// CHECK: call x86_fastcallcc void @_Z4foo22S1i(%struct.S1* inreg %{{.*}}, i32 inreg %
foo2(a, b);
}
extern B array[5];
-// CHECK: define void @_Z9for_arrayv(
+// CHECK-LABEL: define void @_Z9for_arrayv(
void for_array() {
// CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]])
A a;
// CHECK: ret void
}
-// CHECK: define void @_Z9for_rangev(
+// CHECK-LABEL: define void @_Z9for_rangev(
void for_range() {
// CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]])
A a;
// CHECK: ret void
}
-// CHECK: define void @_Z16for_member_rangev(
+// CHECK-LABEL: define void @_Z16for_member_rangev(
void for_member_range() {
// CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]])
A a;
enum MyEnum : char;
void bar(MyEnum value) { }
-// CHECK: define void @_Z3foo6MyEnum
+// CHECK-LABEL: define void @_Z3foo6MyEnum
void foo(MyEnum value)
{
// CHECK: call void @_Z3bar6MyEnum(i8 signext
template <typename T, typename U> struct S { static int i; };
template <> int S<__fp16, __fp16>::i = 3;
-// CHECK: define void @_Z1fPDh(i16* %x)
+// CHECK-LABEL: define void @_Z1fPDh(i16* %x)
void f (__fp16 *x) { }
-// CHECK: define void @_Z1gPDhS_(i16* %x, i16* %y)
+// CHECK-LABEL: define void @_Z1gPDhS_(i16* %x, i16* %y)
void g (__fp16 *x, __fp16 *y) { }
template<typename T> void a(T);
template<> void a(int) {}
-// CHECK: define void @_Z1aIiEvT_
+// CHECK-LABEL: define void @_Z1aIiEvT_
namespace X {
template<typename T> void b(T);
template<> void b(int) {}
}
-// CHECK: define void @_ZN1X1bIiEEvT_
+// CHECK-LABEL: define void @_ZN1X1bIiEEvT_
typedef void (^BL)();
int func(BL, BL, BL);
-// CHECK: define internal void @_ZN1N8ArrBlockE_block_invoke(
-// CHECK: define internal void @_ZN1N8ArrBlockE_block_invoke_2(
-// CHECK: define internal void @_ZN1N8ArrBlockE_block_invoke_3
+// CHECK-LABEL: define internal void @_ZN1N8ArrBlockE_block_invoke(
+// CHECK-LABEL: define internal void @_ZN1N8ArrBlockE_block_invoke_2(
+// CHECK-LABEL: define internal void @_ZN1N8ArrBlockE_block_invoke_3
BL ArrBlock [] = { ^{}, ^{}, ^{} };
-// CHECK: define internal void @_ZN1N4ivalE_block_invoke_4(
-// CHECK: define internal void @_ZN1N4ivalE_block_invoke_5(
-// CHECK: define internal void @_ZN1N4ivalE_block_invoke_6(
+// CHECK-LABEL: define internal void @_ZN1N4ivalE_block_invoke_4(
+// CHECK-LABEL: define internal void @_ZN1N4ivalE_block_invoke_5(
+// CHECK-LABEL: define internal void @_ZN1N4ivalE_block_invoke_6(
int ival = func(^{}, ^{}, ^{});
-// CHECK: define internal void @_ZN1N9gvarlobalE_block_invoke_7(
+// CHECK-LABEL: define internal void @_ZN1N9gvarlobalE_block_invoke_7(
void (^gvarlobal)(void) = ^{};
struct S {
BL field = ^{};
};
-// CHECK: define internal void @_ZN1N3blfE_block_invoke_8(
+// CHECK-LABEL: define internal void @_ZN1N3blfE_block_invoke_8(
S blf;
};
A a, b;
// PR9593
-// CHECK: define void @_Z4funcv()
+// CHECK-LABEL: define void @_Z4funcv()
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZ4funcvE2a1)
// CHECK: call void @_ZN1AC1Ev([[A]]* @_ZZ4funcvE2a1)
// CHECK-NEXT: call i32 @atexit(void ()* @__dtor__ZZ4funcvE2a1)
const int y = x - 1; // This gets deferred.
const int z = ~y; // This also gets deferred, but gets "undeferred" before y.
int test() { return z; }
-// CHECK: define i32 @_ZN5test14testEv()
+// CHECK-LABEL: define i32 @_ZN5test14testEv()
// All of these initializers end up delayed, so we check them later.
}
struct A { A(); ~A(); };
struct V { V(const A &a = A()); ~V(); };
- // CHECK: define linkonce_odr i32 @_ZN5test04testILi0EEEii
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN5test04testILi0EEEii
template<int X> int test(int x) {
// CHECK: [[RET:%.*]] = alloca i32
// CHECK-NEXT: [[X:%.*]] = alloca i32
d1 = d2;
}
-// CHECK: define linkonce_odr %struct.D* @_ZN1DaSERS_
+// CHECK-LABEL: define linkonce_odr %struct.D* @_ZN1DaSERS_
// CHECK: {{call.*_ZN1AaSERS_}}
// CHECK: {{call.*_ZN1BaSERS_}}
// CHECK: {{call.*_ZN1CaSERKS_}}
D d2(d);
}
-// CHECK: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
// CHECK: call void @_ZN1AC1Ev
// CHECK: call void @_ZN1CC2ERS_1A
// CHECK: call void @_ZN1AD1Ev
struct D : C { using C::C; };
D d(123);
-// CHECK: define void @_ZN1BD0Ev
-// CHECK: define void @_ZN1BD1Ev
-// CHECK: define void @_ZN1BD2Ev
+// CHECK-LABEL: define void @_ZN1BD0Ev
+// CHECK-LABEL: define void @_ZN1BD1Ev
+// CHECK-LABEL: define void @_ZN1BD2Ev
-// CHECK: define linkonce_odr void @_ZN1BC1Ei(
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC1Ei(
// CHECK: call void @_ZN1BC2Ei(
-// CHECK: define linkonce_odr void @_ZN1DC1IiEET_(
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1IiEET_(
// CHECK: call void @_ZN1DC2IiEET_(
-// CHECK: define linkonce_odr void @_ZN1DC2IiEET_(
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC2IiEET_(
// CHECK: call void @_ZN1CC2IiEET_(
-// CHECK: define linkonce_odr void @_ZN1BC2Ei(
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ei(
// CHECK: call void @_ZN1AC2Ei(
// CHECK: store {{.*}}, i32* @d
// CHECK: call {{.*}}@llvm.invariant.start(i64 4, i8* bitcast ({{.*}} @d to i8*))
-// CHECK: define void @_Z1ev(
+// CHECK-LABEL: define void @_Z1ev(
// CHECK: call void @_ZN1AC1Ev(%struct.A* @_ZZ1evE1a)
// CHECK: call {{.*}}@llvm.invariant.start(i64 4, i8* bitcast ({{.*}} @_ZZ1evE1a to i8*))
// CHECK-NOT: llvm.invariant.end
inline void f();
};
-// CHECK-NOT: define void @_ZN1A1fEv
+// CHECK-NOT-LABEL: define void @_ZN1A1fEv
void A::f() { }
template<typename> struct B { };
// We need a final CHECK line here.
-// CHECK: define void @_Z1fv
+// CHECK-LABEL: define void @_Z1fv
void f() { }
// <rdar://problem/8740363>
inline void f1(int);
-// CHECK: define linkonce_odr void @_Z2f1i
+// CHECK-LABEL: define linkonce_odr void @_Z2f1i
void f1(int) { }
void test_f1() { f1(17); }
void g() {}
};
- // CHECK: define linkonce_odr void @_ZN5test11C4funcEv(
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test11C4funcEv(
class C {
public:
A a;
f(a);
}
- // CHECK: define linkonce_odr void @_ZN5test21fERKNS_1AE
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test21fERKNS_1AE
}
Y().get();
}
-// CHECK: define weak_odr void @_Z4callIiEvv
+// CHECK-LABEL: define weak_odr void @_Z4callIiEvv
// CHECK: call void @_ZN1Y3getEv
// CHECK-NEXT: call void @_ZN1XD1Ev
// CHECK-NEXT: ret void
(X2){};
}
-// CHECK: define weak_odr void @_Z16compound_literalIiEvv
+// CHECK-LABEL: define weak_odr void @_Z16compound_literalIiEvv
// CHECK: call void @_ZN1XC1Ev
// CHECK-NEXT: call void @_ZN2X2D1Ev
// CHECK-NEXT: ret void
extern "C" auto cvar = []{};
int a() { return []{ return 1; }(); }
-// CHECK: define i32 @_Z1av
+// CHECK-LABEL: define i32 @_Z1av
// CHECK: call i32 @"_ZZ1avENK3$_0clEv"
-// CHECK: define internal i32 @"_ZZ1avENK3$_0clEv"
+// CHECK-LABEL: define internal i32 @"_ZZ1avENK3$_0clEv"
// CHECK: ret i32 1
int b(int x) { return [x]{return x;}(); }
-// CHECK: define i32 @_Z1bi
+// CHECK-LABEL: define i32 @_Z1bi
// CHECK: store i32
// CHECK: load i32*
// CHECK: store i32
// CHECK: call i32 @"_ZZ1biENK3$_1clEv"
-// CHECK: define internal i32 @"_ZZ1biENK3$_1clEv"
+// CHECK-LABEL: define internal i32 @"_ZZ1biENK3$_1clEv"
// CHECK: load i32*
// CHECK: ret i32
int c(int x) { return [&x]{return x;}(); }
-// CHECK: define i32 @_Z1ci
+// CHECK-LABEL: define i32 @_Z1ci
// CHECK: store i32
// CHECK: store i32*
// CHECK: call i32 @"_ZZ1ciENK3$_2clEv"
-// CHECK: define internal i32 @"_ZZ1ciENK3$_2clEv"
+// CHECK-LABEL: define internal i32 @"_ZZ1ciENK3$_2clEv"
// CHECK: load i32**
// CHECK: load i32*
// CHECK: ret i32
struct D { D(); D(const D&); int x; };
int d(int x) { D y[10]; [x,y] { return y[x].x; }(); }
-// CHECK: define i32 @_Z1di
+// CHECK-LABEL: define i32 @_Z1di
// CHECK: call void @_ZN1DC1Ev
// CHECK: icmp ult i64 %{{.*}}, 10
// CHECK: call void @_ZN1DC1ERKS_
// CHECK: call i32 @"_ZZ1diENK3$_3clEv"
-// CHECK: define internal i32 @"_ZZ1diENK3$_3clEv"
+// CHECK-LABEL: define internal i32 @"_ZZ1diENK3$_3clEv"
// CHECK: load i32*
// CHECK: load i32*
// CHECK: ret i32
struct E { E(); E(const E&); ~E(); int x; };
int e(E a, E b, bool cond) { [a,b,cond](){ return (cond ? a : b).x; }(); }
-// CHECK: define i32 @_Z1e1ES_b
+// CHECK-LABEL: define i32 @_Z1e1ES_b
// CHECK: call void @_ZN1EC1ERKS_
// CHECK: invoke void @_ZN1EC1ERKS_
// CHECK: invoke i32 @"_ZZ1e1ES_bENK3$_4clEv"
// CHECK: call void @"_ZZ1e1ES_bEN3$_4D1Ev"
// CHECK: call void @"_ZZ1e1ES_bEN3$_4D1Ev"
-// CHECK: define internal i32 @"_ZZ1e1ES_bENK3$_4clEv"
+// CHECK-LABEL: define internal i32 @"_ZZ1e1ES_bENK3$_4clEv"
// CHECK: trunc i8
// CHECK: load i32*
// CHECK: ret i32
void f() {
- // CHECK: define void @_Z1fv()
+ // CHECK-LABEL: define void @_Z1fv()
// CHECK: @"_ZZ1fvENK3$_5cvPFiiiEEv"
// CHECK-NEXT: store i32 (i32, i32)*
// CHECK-NEXT: ret void
static int k;
int g() {
int &r = k;
- // CHECK: define internal i32 @"_ZZ1gvENK3$_6clEv"(
+ // CHECK-LABEL: define internal i32 @"_ZZ1gvENK3$_6clEv"(
// CHECK-NOT: }
// CHECK: load i32* @_ZL1k,
return [] { return r; } ();
A (*h)() = [] { return A(); };
}
-// CHECK: define internal i32 @"_ZZ1fvEN3$_58__invokeEii"
+// CHECK-LABEL: define internal i32 @"_ZZ1fvEN3$_58__invokeEii"
// CHECK: store i32
// CHECK-NEXT: store i32
// CHECK-NEXT: load i32*
// CHECK-NEXT: call i32 @"_ZZ1fvENK3$_5clEii"
// CHECK-NEXT: ret i32
-// CHECK: define internal void @"_ZZ1e1ES_bEN3$_4D2Ev"
+// CHECK-LABEL: define internal void @"_ZZ1e1ES_bEN3$_4D2Ev"
// <rdar://problem/12778708>
struct XXX {};
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -O1 -disable-llvm-optzns %s -o - | FileCheck %s
namespace test1 {
- // CHECK-DAG: define linkonce_odr void @_ZN5test11fIZNS_1gEvE1SEEvT_(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test11fIZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
inline void *g() {
struct S {
}
namespace test2 {
- // CHECK-DAG: define internal void @_ZN5test21fIZNS_L1gEvE1SEEvT_(
+ // CHECK-DAG-LABEL: define internal void @_ZN5test21fIZNS_L1gEvE1SEEvT_(
template <typename T> void f(T) {}
static inline void *g() {
struct S {
}
namespace test3 {
- // CHECK-DAG: define internal void @_ZN5test31fIZNS_1gEvE1SEEvT_(
+ // CHECK-DAG-LABEL: define internal void @_ZN5test31fIZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
void *g() {
struct S {
}
namespace test4 {
- // CHECK-DAG: define linkonce_odr void @_ZN5test41fIZNS_1gILi1EEEPvvE1SEEvT_(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test41fIZNS_1gILi1EEEPvvE1SEEvT_(
template <typename T> void f(T) {}
template <int N> inline void *g() {
struct S {
}
namespace test5 {
- // CHECK-DAG: define linkonce_odr void @_ZN5test51fIZNS_1gILi1EEEPvvE1SEEvT_(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test51fIZNS_1gILi1EEEPvvE1SEEvT_(
template <typename T> void f(T) {}
template <int N> inline void *g() {
struct S {
}
namespace test6 {
- // CHECK-DAG: define linkonce_odr void @_ZN5test61fIZZNS_1gEvEN1S1hEvE1TEEvv(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test61fIZZNS_1gEvEN1S1hEvE1TEEvv(
template <typename T> void f() {}
inline void *g() {
}
namespace test7 {
- // CHECK-DAG: define internal void @_ZN5test71fIZZNS_1gEvEN1S1hEvE1TEEvv(
+ // CHECK-DAG-LABEL: define internal void @_ZN5test71fIZZNS_1gEvEN1S1hEvE1TEEvv(
template <typename T> void f() {}
void *g() {
}
namespace test8 {
- // CHECK-DAG: define linkonce_odr void @_ZN5test81fIZNS_1gEvE1SEEvT_(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test81fIZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
inline void *g() {
enum S {
}
namespace test9 {
- // CHECK-DAG: define linkonce_odr void @_ZN5test91fIPZNS_1gEvE1SEEvT_(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test91fIPZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
inline void *g() {
struct S {
}
namespace test10 {
- // CHECK-DAG: define linkonce_odr void @_ZN6test101fIPFZNS_1gEvE1SvEEEvT_(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test101fIPFZNS_1gEvE1SvEEEvT_(
template <typename T> void f(T) {}
inline void *g() {
struct S {
}
namespace test11 {
- // CHECK-DAG: define internal void @_ZN6test111fIPFZNS_1gEvE1SPNS_12_GLOBAL__N_11IEEEEvT_(
+ // CHECK-DAG-LABEL: define internal void @_ZN6test111fIPFZNS_1gEvE1SPNS_12_GLOBAL__N_11IEEEEvT_(
namespace {
struct I {
};
}
namespace test12 {
- // CHECK-DAG: define linkonce_odr void @_ZN6test123fooIZNS_3barIZNS_3zedEvE2S2EEPvvE2S1EEvv
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test123fooIZNS_3barIZNS_3zedEvE2S2EEPvvE2S1EEvv
template <typename T> void foo() {}
template <typename T> inline void *bar() {
enum S1 {
}
namespace test13 {
- // CHECK-DAG: define linkonce_odr void @_ZZN6test133fooEvEN1S3barEv(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZZN6test133fooEvEN1S3barEv(
inline void *foo() {
struct S {
static void bar() {}
}
namespace test14 {
- // CHECK-DAG: define linkonce_odr void @_ZN6test143fooIZNS_1fEvE1SE3barILPS1_0EEEvv(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test143fooIZNS_1fEvE1SE3barILPS1_0EEEvv(
template <typename T> struct foo {
template <T *P> static void bar() {}
static void *g() { return (void *)bar<nullptr>; }
}
namespace test15 {
- // CHECK-DAG: define linkonce_odr void @_ZN6test153zedIZNS_3fooIiEEPvvE3barEEvv(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test153zedIZNS_3fooIiEEPvvE3barEEvv(
template <class T> void zed() {}
template <class T> void *foo() {
class bar {
}
namespace test16 {
- // CHECK-DAG: define linkonce_odr void @_ZN6test163zedIZNS_3fooIiE3barEvE1SEEvv(
+ // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test163zedIZNS_3fooIiE3barEvE1SEEvv(
template <class T> void zed() {}
template <class T> struct foo {
static void *bar();
namespace test17 {
// CHECK-DAG: @_ZZN6test173fooILi42EEEPivE3bar = linkonce_odr
- // CHECK-DAG: define weak_odr i32* @_ZN6test173fooILi42EEEPiv(
+ // CHECK-DAG-LABEL: define weak_odr i32* @_ZN6test173fooILi42EEEPiv(
template<int I>
int *foo() {
static int bar;
struct X { int i; float f; };
struct Y { X x; };
-// CHECK: define void @_Z21reinterpret_cast_testRiRfR1X
+// CHECK-LABEL: define void @_Z21reinterpret_cast_testRiRfR1X
void reinterpret_cast_test(int &ir, float &fr, X &xr) {
// CHECK: load float**
// CHECK: bitcast float*
// CHECK: ret void
}
-// CHECK: define void @_Z6c_castRiRfR1X
+// CHECK-LABEL: define void @_Z6c_castRiRfR1X
void c_cast(int &ir, float &fr, X &xr) {
// CHECK: load float**
// CHECK: bitcast float*
// CHECK: ret void
}
-// CHECK: define void @_Z15functional_castRiRfR1X
+// CHECK-LABEL: define void @_Z15functional_castRiRfR1X
void functional_cast(int &ir, float &fr, X &xr) {
typedef int &intref;
typedef float &floatref;
template <bool B> struct S3 {};
-// CHECK: define void @_Z1f2S3ILb1EE
+// CHECK-LABEL: define void @_Z1f2S3ILb1EE
void f(S3<true>) {}
-// CHECK: define void @_Z1f2S3ILb0EE
+// CHECK-LABEL: define void @_Z1f2S3ILb0EE
void f(S3<false>) {}
-// CHECK: define void @_Z2f22S3ILb1EE
+// CHECK-LABEL: define void @_Z2f22S3ILb1EE
void f2(S3<100>) {}
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
-// CHECK: define void @_Z2f0Pc
+// CHECK-LABEL: define void @_Z2f0Pc
void f0(char *p) { }
-// CHECK: define void @_Z2f0PU3AS1c
+// CHECK-LABEL: define void @_Z2f0PU3AS1c
void f0(char __attribute__((address_space(1))) *p) { }
struct OpaqueType;
typedef OpaqueType __attribute__((address_space(100))) * OpaqueTypePtr;
-// CHECK: define void @_Z2f0PU5AS10010OpaqueType
+// CHECK-LABEL: define void @_Z2f0PU5AS10010OpaqueType
void f0(OpaqueTypePtr) { }
template<typename T, typename U> using U = S<T, int, U>;
template<typename...Ts> void h(U<Ts...>, Ts...);
-// CHECK: define void @_Z1zv(
+// CHECK-LABEL: define void @_Z1zv(
void z() {
vector<int> VI;
f(VI);
template <int N> T<N> f() { return T<N>(); }
- // CHECK: define weak_odr void @_ZN5Casts8implicitILj4EEEvPN9enable_ifIXleT_Li4EEvE4typeE
+ // CHECK-LABEL: define weak_odr void @_ZN5Casts8implicitILj4EEEvPN9enable_ifIXleT_Li4EEvE4typeE
template void implicit<4>(void*);
- // CHECK: define weak_odr void @_ZN5Casts6cstyleILj4EEEvPN9enable_ifIXleT_cvjLi4EEvE4typeE
+ // CHECK-LABEL: define weak_odr void @_ZN5Casts6cstyleILj4EEEvPN9enable_ifIXleT_cvjLi4EEvE4typeE
template void cstyle<4>(void*);
- // CHECK: define weak_odr void @_ZN5Casts10functionalILj4EEEvPN9enable_ifIXleT_cvjLi4EEvE4typeE
+ // CHECK-LABEL: define weak_odr void @_ZN5Casts10functionalILj4EEEvPN9enable_ifIXleT_cvjLi4EEvE4typeE
template void functional<4>(void*);
- // CHECK: define weak_odr void @_ZN5Casts7static_ILj4EEEvPN9enable_ifIXleT_cvjLi4EEvE4typeE
+ // CHECK-LABEL: define weak_odr void @_ZN5Casts7static_ILj4EEEvPN9enable_ifIXleT_cvjLi4EEvE4typeE
template void static_<4>(void*);
- // CHECK: define weak_odr void @_ZN5Casts1fILi6EEENS_1TIXT_EEEv
+ // CHECK-LABEL: define weak_odr void @_ZN5Casts1fILi6EEENS_1TIXT_EEEv
template T<6> f<6>();
- // CHECK: define weak_odr void @_ZN5Casts5auto_IiEEvDTnw_DapicvT__EEE(
+ // CHECK-LABEL: define weak_odr void @_ZN5Casts5auto_IiEEvDTnw_DapicvT__EEE(
template void auto_<int>(int*);
- // CHECK: define weak_odr void @_ZN5Casts7scalar_IiEEvDTcmcvT__Ecvi_EE(
+ // CHECK-LABEL: define weak_odr void @_ZN5Casts7scalar_IiEEvDTcmcvT__Ecvi_EE(
template void scalar_<int>(int);
}
short foo(short);
int foo(int);
- // CHECK: define linkonce_odr signext i16 @_ZN5test11aIsEEDTcl3foocvT__EEES1_(
+ // CHECK-LABEL: define linkonce_odr signext i16 @_ZN5test11aIsEEDTcl3foocvT__EEES1_(
template <class T> auto a(T t) -> decltype(foo(T())) { return foo(t); }
- // CHECK: define linkonce_odr signext i16 @_ZN5test11bIsEEDTcp3foocvT__EEES1_(
+ // CHECK-LABEL: define linkonce_odr signext i16 @_ZN5test11bIsEEDTcp3foocvT__EEES1_(
template <class T> auto b(T t) -> decltype((foo)(T())) { return (foo)(t); }
void test(short s) {
float baz(float(*)());
void fred(float(*)(), float);
- // CHECK: define void @_ZN5test211instantiateEv
+ // CHECK-LABEL: define void @_ZN5test211instantiateEv
void instantiate() {
// CHECK: call void @_ZN5test21aIPFfvEEEvT_DTclfL0p_EE(
a(foo, 0.0f);
int *member;
};
- // CHECK: define void @_ZN5test311instantiateEv
+ // CHECK-LABEL: define void @_ZN5test311instantiateEv
void instantiate() {
X x;
int *ip;
struct X { };
-// CHECK: define void @_Z1fPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP1XS13_S12_S11_S10_SZ_SY_SX_SW_SV_SU_ST_SS_SR_SQ_SP_SO_SN_SM_SL_SK_SJ_SI_SH_SG_SF_SE_SD_SC_SB_SA_S9_S8_S7_S6_S5_S4_S3_S2_S1_S0_S_(
+// CHECK-LABEL: define void @_Z1fPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP1XS13_S12_S11_S10_SZ_SY_SX_SW_SV_SU_ST_SS_SR_SQ_SP_SO_SN_SM_SL_SK_SJ_SI_SH_SG_SF_SE_SD_SC_SB_SA_S9_S8_S7_S6_S5_S4_S3_S2_S1_S0_S_(
void f(X****************************************,
X****************************************,
X***************************************,
// CHECK: @_ZZZN7PR12917IJicdEEC1EicdEd0_NKUlvE_clEvE1n = linkonce_odr global i32 0
// CHECK: @_ZZZN7PR12917IJicdEEC1EicdEd1_NKUlvE_clEvE1n = linkonce_odr global i32 0
-// CHECK: define linkonce_odr void @_Z11inline_funci
+// CHECK-LABEL: define linkonce_odr void @_Z11inline_funci
inline void inline_func(int n) {
// CHECK: call i32 @_ZZ11inline_funciENKUlvE_clEv
int i = []{ return 1; }();
void S::g(int i = []{return 1;}(),
int j = []{return 2; }()) {}
-// CHECK: define void @_Z6test_S1S
+// CHECK-LABEL: define void @_Z6test_S1S
void test_S(S s) {
// CHECK: call i32 @_ZZN1S1fEiiEd0_NKUlvE_clEv
// CHECK-NEXT: call i32 @_ZZN1S1fEiiEd0_NKUlvE0_clEv
}
// Check the linkage of the lambda call operators used in test_S.
-// CHECK: define linkonce_odr i32 @_ZZN1S1fEiiEd0_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZZN1S1fEiiEd0_NKUlvE_clEv
// CHECK: ret i32 1
-// CHECK: define linkonce_odr i32 @_ZZN1S1fEiiEd0_NKUlvE0_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZZN1S1fEiiEd0_NKUlvE0_clEv
// CHECK: ret i32 2
-// CHECK: define linkonce_odr i32 @_ZZN1S1fEiiEd_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZZN1S1fEiiEd_NKUlvE_clEv
// CHECK: ret i32 3
-// CHECK: define internal i32 @"_ZNK1S3$_0clEv"
+// CHECK-LABEL: define internal i32 @"_ZNK1S3$_0clEv"
// CHECK: ret i32 1
-// CHECK: define internal i32 @"_ZNK1S3$_1clEv"
+// CHECK-LABEL: define internal i32 @"_ZNK1S3$_1clEv"
// CHECK: ret i32 2
template<typename T>
T = []{return T(3);}());
};
-// CHECK: define void @_Z7test_ST2STIdE
+// CHECK-LABEL: define void @_Z7test_ST2STIdE
void test_ST(ST<double> st) {
// CHECK: call double @_ZZN2STIdE1fEddEd0_NKUlvE_clEv
// CHECK-NEXT: call double @_ZZN2STIdE1fEddEd0_NKUlvE0_clEv
}
// Check the linkage of the lambda call operators used in test_ST.
-// CHECK: define linkonce_odr double @_ZZN2STIdE1fEddEd0_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr double @_ZZN2STIdE1fEddEd0_NKUlvE_clEv
// CHECK: ret double 1
-// CHECK: define linkonce_odr double @_ZZN2STIdE1fEddEd0_NKUlvE0_clEv
+// CHECK-LABEL: define linkonce_odr double @_ZZN2STIdE1fEddEd0_NKUlvE0_clEv
// CHECK: ret double 2
-// CHECK: define linkonce_odr double @_ZZN2STIdE1fEddEd_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr double @_ZZN2STIdE1fEddEd_NKUlvE_clEv
// CHECK: ret double 3
template<typename T>
template<typename T>
int (*StaticMembers<T>::f)() = []{return 5;};
-// CHECK: define internal void @__cxx_global_var_init()
+// CHECK-LABEL: define internal void @__cxx_global_var_init()
// CHECK: call i32 @_ZNK13StaticMembersIfE1xMUlvE_clEv
// CHECK-NEXT: call i32 @_ZNK13StaticMembersIfE1xMUlvE0_clEv
// CHECK-NEXT: add nsw
-// CHECK: define linkonce_odr i32 @_ZNK13StaticMembersIfE1xMUlvE_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK13StaticMembersIfE1xMUlvE_clEv
// CHECK: ret i32 1
-// CHECK: define linkonce_odr i32 @_ZNK13StaticMembersIfE1xMUlvE0_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK13StaticMembersIfE1xMUlvE0_clEv
// CHECK: ret i32 2
template float StaticMembers<float>::x;
-// CHECK: define internal void @__cxx_global_var_init1()
+// CHECK-LABEL: define internal void @__cxx_global_var_init1()
// CHECK: call i32 @_ZNK13StaticMembersIfE1yMUlvE_clEv
-// CHECK: define linkonce_odr i32 @_ZNK13StaticMembersIfE1yMUlvE_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK13StaticMembersIfE1yMUlvE_clEv
// CHECK: ret i32 3
template float StaticMembers<float>::y;
-// CHECK: define internal void @__cxx_global_var_init2()
+// CHECK-LABEL: define internal void @__cxx_global_var_init2()
// CHECK: call i32 @_Z13accept_lambdaIN13StaticMembersIfE1zMUlvE_EEiT_
// CHECK: declare i32 @_Z13accept_lambdaIN13StaticMembersIfE1zMUlvE_EEiT_()
template float StaticMembers<float>::z;
-// CHECK: define internal void @__cxx_global_var_init3()
+// CHECK-LABEL: define internal void @__cxx_global_var_init3()
// CHECK: call {{.*}} @_ZNK13StaticMembersIfE1fMUlvE_cvPFivEEv
-// CHECK: define linkonce_odr i32 ()* @_ZNK13StaticMembersIfE1fMUlvE_cvPFivEEv
+// CHECK-LABEL: define linkonce_odr i32 ()* @_ZNK13StaticMembersIfE1fMUlvE_cvPFivEEv
template int (*StaticMembers<float>::f)();
-// CHECK: define internal void @__cxx_global_var_init4
+// CHECK-LABEL: define internal void @__cxx_global_var_init4
// CHECK: call i32 @"_ZNK13StaticMembersIdE3$_2clEv"
-// CHECK: define internal i32 @"_ZNK13StaticMembersIdE3$_2clEv"
+// CHECK-LABEL: define internal i32 @"_ZNK13StaticMembersIdE3$_2clEv"
// CHECK: ret i32 42
template<> double StaticMembers<double>::z = []{return 42; }();
template<typename T>
void func_template(T = []{ return T(); }());
-// CHECK: define void @_Z17use_func_templatev()
+// CHECK-LABEL: define void @_Z17use_func_templatev()
void use_func_template() {
// CHECK: call i32 @"_ZZ13func_templateIiEvT_ENK3$_3clEv"
func_template<int>();
};
void B::h() { f(); }
}
-// CHECK: define linkonce_odr %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
namespace PR12808 {
template <typename> struct B {
void f() {
b<int>(1);
}
- // CHECK: define linkonce_odr void @_ZZN7PR128081bIiEEviENKUlvE_clEv
- // CHECK: define linkonce_odr i32 @_ZZZN7PR128081bIiEEviENKUlvE_clEvENKUlvE_clEv
+ // CHECK-LABEL: define linkonce_odr void @_ZZN7PR128081bIiEEviENKUlvE_clEv
+ // CHECK-LABEL: define linkonce_odr i32 @_ZZZN7PR128081bIiEEviENKUlvE_clEvENKUlvE_clEv
}
-// CHECK: define linkonce_odr void @_Z1fIZZNK23TestNestedInstantiationclEvENKUlvE_clEvEUlvE_EvT_
+// CHECK-LABEL: define linkonce_odr void @_Z1fIZZNK23TestNestedInstantiationclEvENKUlvE_clEvEUlvE_EvT_
struct Members {
int x = [] { return 1; }() + [] { return 2; }();
};
void test_Members() {
- // CHECK: define linkonce_odr void @_ZN7MembersC2Ev
+ // CHECK-LABEL: define linkonce_odr void @_ZN7MembersC2Ev
// CHECK: call i32 @_ZNK7Members1xMUlvE_clEv
// CHECK-NEXT: call i32 @_ZNK7Members1xMUlvE0_clE
// CHECK-NEXT: add nsw i32
}
// Check the linkage of the lambdas used in test_Members.
-// CHECK: define linkonce_odr i32 @_ZNK7Members1xMUlvE_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1xMUlvE_clEv
// CHECK: ret i32 1
-// CHECK: define linkonce_odr i32 @_ZNK7Members1xMUlvE0_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1xMUlvE0_clEv
// CHECK: ret i32 2
-// CHECK: define linkonce_odr i32 @_ZNK7Members1yMUlvE_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZNK7Members1yMUlvE_clEv
// CHECK: ret i32 3
// Check linkage of the various lambdas.
-// CHECK: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE_clEv
// CHECK: ret i32 1
-// CHECK: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE0_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE0_clEv
// CHECK: ret i32
-// CHECK: define linkonce_odr double @_ZZ11inline_funciENKUlvE1_clEv
+// CHECK-LABEL: define linkonce_odr double @_ZZ11inline_funciENKUlvE1_clEv
// CHECK: ret double
-// CHECK: define linkonce_odr i32 @_ZZ11inline_funciENKUliE_clEi
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUliE_clEi
// CHECK: ret i32
-// CHECK: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE2_clEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZZ11inline_funciENKUlvE2_clEv
// CHECK: ret i32 17
template<int *ip> struct IP {};
-// CHECK: define void @_Z5test12IPILPi0EE
+// CHECK-LABEL: define void @_Z5test12IPILPi0EE
void test1(IP<nullptr>) {}
struct X{ };
template<int X::*pm> struct PM {};
-// CHECK: define void @_Z5test22PMILM1Xi0EE
+// CHECK-LABEL: define void @_Z5test22PMILM1Xi0EE
void test2(PM<nullptr>) { }
-// CHECK: define void @_Z5test316DependentTypePtrIPiLS0_0EE
+// CHECK-LABEL: define void @_Z5test316DependentTypePtrIPiLS0_0EE
template<typename T, T x> struct DependentTypePtr {};
void test3(DependentTypePtr<int*,nullptr>) { }
int h() const &&;
};
-// CHECK: define i32 @_ZNR1X1fEv
+// CHECK-LABEL: define i32 @_ZNR1X1fEv
int X::f() & { return 0; }
-// CHECK: define i32 @_ZNO1X1gEv
+// CHECK-LABEL: define i32 @_ZNO1X1gEv
int X::g() && { return 0; }
-// CHECK: define i32 @_ZNKO1X1hEv
+// CHECK-LABEL: define i32 @_ZNKO1X1hEv
int X::h() const && { return 0; }
-// CHECK: define void @_Z1fM1XFivREMS_FivOEMS_KFivOE
+// CHECK-LABEL: define void @_Z1fM1XFivREMS_FivOEMS_KFivOE
void f(int (X::*)() &, int (X::*)() &&, int (X::*)() const&&) { }
-// CHECK: define void @_Z1g1AIFivEES_IFivREES_IFivOEES_IKFivEES_IKFivREES_IKFivOEES_IVKFivEES_IVKFivREES_IVKFivOEE()
+// CHECK-LABEL: define void @_Z1g1AIFivEES_IFivREES_IFivOEES_IKFivEES_IKFivREES_IKFivOEES_IVKFivEES_IVKFivREES_IVKFivOEE()
template <class T> struct A {};
void g(A<int()>, A<int()&>, A<int()&&>,
A<int() const>, A<int() const &>, A<int() const &&>,
namespace std {
struct A { A(); };
- // CHECK: define void @_ZNSt1AC1Ev(%"struct.std::A"* %this) unnamed_addr
- // CHECK: define void @_ZNSt1AC2Ev(%"struct.std::A"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZNSt1AC1Ev(%"struct.std::A"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZNSt1AC2Ev(%"struct.std::A"* %this) unnamed_addr
A::A() { }
};
template<typename> struct allocator { };
}
-// CHECK: define void @_Z1fSaIcESaIiE
+// CHECK-LABEL: define void @_Z1fSaIcESaIiE
void f(std::allocator<char>, std::allocator<int>) { }
namespace std {
template<typename, typename, typename> struct basic_string { };
}
-// CHECK: define void @_Z1fSbIcciE
+// CHECK-LABEL: define void @_Z1fSbIcciE
void f(std::basic_string<char, char, int>) { }
namespace std {
}
// Make sure we don't treat the following like std::string
-// CHECK: define void @_Z1f12basic_stringIcSt11char_traitsIcESaIcEE
+// CHECK-LABEL: define void @_Z1f12basic_stringIcSt11char_traitsIcESaIcEE
template<typename, typename, typename> struct basic_string { };
typedef basic_string<char, std::char_traits<char>, std::allocator<char> > not_string;
void f(not_string) { }
namespace std {
struct A { void f(); };
- // CHECK: define void @_ZN1N3std1A1fEv
+ // CHECK-LABEL: define void @_ZN1N3std1A1fEv
void A::f() { }
}
}
struct X {};
-// CHECK: define void @_Z1f1XS_(
+// CHECK-LABEL: define void @_Z1f1XS_(
void f(X, X) { }
-// CHECK: define void @_Z1fR1XS0_(
+// CHECK-LABEL: define void @_Z1fR1XS0_(
void f(X&, X&) { }
-// CHECK: define void @_Z1fRK1XS1_(
+// CHECK-LABEL: define void @_Z1fRK1XS1_(
void f(const X&, const X&) { }
typedef void T();
struct S {};
-// CHECK: define void @_Z1fPFvvEM1SFvvE(
+// CHECK-LABEL: define void @_Z1fPFvvEM1SFvvE(
void f(T*, T (S::*)) {}
namespace A {
struct B { };
};
-// CHECK: define void @_Z1fN1A1AENS_1BE(
+// CHECK-LABEL: define void @_Z1fN1A1AENS_1BE(
void f(A::A a, A::B b) { }
struct C {
struct D { };
};
-// CHECK: define void @_Z1fN1C1DERS_PS_S1_(
+// CHECK-LABEL: define void @_Z1fN1C1DERS_PS_S1_(
void f(C::D, C&, C*, C&) { }
template<typename T>
// PR5420
# 1 "fake_system_header.h" 1 3 4
-// CHECK: define void @_ZdlPvS_(
+// CHECK-LABEL: define void @_ZdlPvS_(
void operator delete (void*, void*) {}
// PR6217
-// CHECK: define void @_Z3barv()
+// CHECK-LABEL: define void @_Z3barv()
void bar() { }
template<typename T>
void f(int_c<meta<T>::type::value>) { }
- // CHECK: define weak_odr void @_ZN5test81fIiEEvNS_5int_cIXsr4metaIT_E4typeE5valueEEE(
+ // CHECK-LABEL: define weak_odr void @_ZN5test81fIiEEvNS_5int_cIXsr4metaIT_E4typeE5valueEEE(
template void f<int>(int_c<sizeof(int)>);
}
const int n = 10;
template<typename T, T v> void test() {}
void use() {
- // CHECK: define internal void @_ZN6test124testIFivEXadL_ZNS_L1fEvEEEEvv(
+ // CHECK-LABEL: define internal void @_ZN6test124testIFivEXadL_ZNS_L1fEvEEEEvv(
test<int(), &f>();
- // CHECK: define internal void @_ZN6test124testIRFivELZNS_L1fEvEEEvv(
+ // CHECK-LABEL: define internal void @_ZN6test124testIRFivELZNS_L1fEvEEEvv(
test<int(&)(), f>();
- // CHECK: define internal void @_ZN6test124testIPKiXadL_ZNS_L1nEEEEEvv(
+ // CHECK-LABEL: define internal void @_ZN6test124testIPKiXadL_ZNS_L1nEEEEEvv(
test<const int*, &n>();
- // CHECK: define internal void @_ZN6test124testIRKiLZNS_L1nEEEEvv(
+ // CHECK-LABEL: define internal void @_ZN6test124testIRKiLZNS_L1nEEEEvv(
test<const int&, n>();
}
}
template <class T> void make_test8(T value) { Test8<T> t(value); }
void test8() { make_test8(T8); }
-// CHECK: define internal void @"_ZNV3$_35test9Ev"(
+// CHECK-LABEL: define internal void @"_ZNV3$_35test9Ev"(
typedef volatile struct {
void test9() volatile {}
} Test9;
a.test9();
}
-// CHECK: define internal void @"_ZN5Test8I3$_2EC1ES0_"(
+// CHECK-LABEL: define internal void @"_ZN5Test8I3$_2EC1ES0_"(
template<int ...Values> struct int_tuple { };
template<template<typename> class ...Templates> struct template_tuple { };
-// CHECK: define weak_odr void @_Z2f0IJEEv1XIXsZT_EJDpRT_EE
+// CHECK-LABEL: define weak_odr void @_Z2f0IJEEv1XIXsZT_EJDpRT_EE
template<typename ...Types>
void f0(X<sizeof...(Types), Types&...>) { }
template void f0(X<0>);
-// CHECK: define weak_odr void @_Z2f0IJifdEEv1XIXsZT_EJDpRT_EE
+// CHECK-LABEL: define weak_odr void @_Z2f0IJifdEEv1XIXsZT_EJDpRT_EE
template void f0<int, float, double>(X<3, int&, float&, double&>);
// Mangling for template argument packs
template<typename ...Types> void f1() {}
-// CHECK: define weak_odr void @_Z2f1IJEEvv
+// CHECK-LABEL: define weak_odr void @_Z2f1IJEEvv
template void f1<>();
-// CHECK: define weak_odr void @_Z2f1IJiEEvv
+// CHECK-LABEL: define weak_odr void @_Z2f1IJiEEvv
template void f1<int>();
-// CHECK: define weak_odr void @_Z2f1IJifEEvv
+// CHECK-LABEL: define weak_odr void @_Z2f1IJifEEvv
template void f1<int, float>();
// Mangling function parameter packs
template<typename ...Types> void f2(Types...) {}
-// CHECK: define weak_odr void @_Z2f2IJEEvDpT_
+// CHECK-LABEL: define weak_odr void @_Z2f2IJEEvDpT_
template void f2<>();
-// CHECK: define weak_odr void @_Z2f2IJiEEvDpT_
+// CHECK-LABEL: define weak_odr void @_Z2f2IJiEEvDpT_
template void f2<int>(int);
-// CHECK: define weak_odr void @_Z2f2IJifEEvDpT_
+// CHECK-LABEL: define weak_odr void @_Z2f2IJifEEvDpT_
template void f2<int, float>(int, float);
// Mangling non-trivial function parameter packs
template<typename ...Types> void f3(const Types *...) {}
-// CHECK: define weak_odr void @_Z2f3IJEEvDpPKT_
+// CHECK-LABEL: define weak_odr void @_Z2f3IJEEvDpPKT_
template void f3<>();
-// CHECK: define weak_odr void @_Z2f3IJiEEvDpPKT_
+// CHECK-LABEL: define weak_odr void @_Z2f3IJiEEvDpPKT_
template void f3<int>(const int*);
-// CHECK: define weak_odr void @_Z2f3IJifEEvDpPKT_
+// CHECK-LABEL: define weak_odr void @_Z2f3IJifEEvDpPKT_
template void f3<int, float>(const int*, const float*);
// Mangling of type pack expansions in a template argument
template<typename ...Types> tuple<Types...> f4() {}
-// CHECK: define weak_odr void @_Z2f4IJifdEE5tupleIJDpT_EEv
+// CHECK-LABEL: define weak_odr void @_Z2f4IJifdEE5tupleIJDpT_EEv
template tuple<int, float, double> f4();
// Mangling of type pack expansions in a function type
template<typename R, typename ...ArgTypes> identity<R(ArgTypes...)> f5() {}
-// CHECK: define weak_odr void @_Z2f5IiJifdEE8identityIFT_DpT0_EEv
+// CHECK-LABEL: define weak_odr void @_Z2f5IiJifdEE8identityIFT_DpT0_EEv
template identity<int(int, float, double)> f5();
// Mangling of non-type template argument expansions
template<int ...Values> int_tuple<Values...> f6() {}
-// CHECK: define weak_odr void @_Z2f6IJLi1ELi2ELi3EEE9int_tupleIJXspT_EEEv
+// CHECK-LABEL: define weak_odr void @_Z2f6IJLi1ELi2ELi3EEE9int_tupleIJXspT_EEEv
template int_tuple<1, 2, 3> f6();
// Mangling of template template argument expansions
template<template<typename> class ...Templates>
template_tuple<Templates...> f7() {}
-// CHECK: define weak_odr void @_Z2f7IJ8identity13add_referenceEE14template_tupleIJDpT_EEv
+// CHECK-LABEL: define weak_odr void @_Z2f7IJ8identity13add_referenceEE14template_tupleIJDpT_EEv
template template_tuple<identity, add_reference> f7();
//CHECK: @pr5966_i = external global
//CHECK: @_ZL8pr5966_i = internal global
-// CHECK: define zeroext i1 @_ZplRK1YRA100_P1X
+// CHECK-LABEL: define zeroext i1 @_ZplRK1YRA100_P1X
bool operator+(const Y&, X* (&xs)[100]) { return false; }
-// CHECK: define void @_Z1f1s
+// CHECK-LABEL: define void @_Z1f1s
typedef struct { int a; } s;
void f(s) { }
-// CHECK: define void @_Z1f1e
+// CHECK-LABEL: define void @_Z1f1e
typedef enum { foo } e;
void f(e) { }
-// CHECK: define void @_Z1f1u
+// CHECK-LABEL: define void @_Z1f1u
typedef union { int a; } u;
void f(u) { }
-// CHECK: define void @_Z1f1x
+// CHECK-LABEL: define void @_Z1f1x
typedef struct { int a; } x,y;
void f(y) { }
-// CHECK: define void @_Z1fv
+// CHECK-LABEL: define void @_Z1fv
void f() { }
-// CHECK: define void @_ZN1N1fEv
+// CHECK-LABEL: define void @_ZN1N1fEv
namespace N { void f() { } }
-// CHECK: define void @_ZN1N1N1fEv
+// CHECK-LABEL: define void @_ZN1N1N1fEv
namespace N { namespace N { void f() { } } }
-// CHECK: define void @unmangled_function
+// CHECK-LABEL: define void @unmangled_function
extern "C" { namespace N { void unmangled_function() { } } }
extern "C" { namespace N { int unmangled_variable = 10; } }
namespace N { int h(); void g() { static int a = h(); } }
-// CHECK: define void @_Z1fno
+// CHECK-LABEL: define void @_Z1fno
void f(__int128_t, __uint128_t) { }
template <typename T> struct S1 {};
-// CHECK: define void @_Z1f2S1IiE
+// CHECK-LABEL: define void @_Z1f2S1IiE
void f(S1<int>) {}
-// CHECK: define void @_Z1f2S1IdE
+// CHECK-LABEL: define void @_Z1f2S1IdE
void f(S1<double>) {}
template <int N> struct S2 {};
-// CHECK: define void @_Z1f2S2ILi100EE
+// CHECK-LABEL: define void @_Z1f2S2ILi100EE
void f(S2<100>) {}
-// CHECK: define void @_Z1f2S2ILin100EE
+// CHECK-LABEL: define void @_Z1f2S2ILin100EE
void f(S2<-100>) {}
template <bool B> struct S3 {};
-// CHECK: define void @_Z1f2S3ILb1EE
+// CHECK-LABEL: define void @_Z1f2S3ILb1EE
void f(S3<true>) {}
-// CHECK: define void @_Z1f2S3ILb0EE
+// CHECK-LABEL: define void @_Z1f2S3ILb0EE
void f(S3<false>) {}
struct S;
-// CHECK: define void @_Z1fM1SKFvvE
+// CHECK-LABEL: define void @_Z1fM1SKFvvE
void f(void (S::*)() const) {}
-// CHECK: define void @_Z1fM1SFvvE
+// CHECK-LABEL: define void @_Z1fM1SFvvE
void f(void (S::*)()) {}
-// CHECK: define void @_Z1fi
+// CHECK-LABEL: define void @_Z1fi
void f(const int) { }
template<typename T, typename U> void ft1(U u, T t) { }
template<typename T> struct __enable_if<true, T> { typedef T __type; };
template<typename T>
-// CHECK: define linkonce_odr void @_ZN6PR57968__fill_aIiEENS_11__enable_ifIXntsr16__is_scalar_typeIT_EE7__valueEvE6__typeEv
+// CHECK-LABEL: define linkonce_odr void @_ZN6PR57968__fill_aIiEENS_11__enable_ifIXntsr16__is_scalar_typeIT_EE7__valueEvE6__typeEv
typename __enable_if<!__is_scalar_type<T>::__value, void>::__type __fill_a() { };
void f() { __fill_a<int>(); }
namespace Expressions {
// Unary operators.
-// CHECK: define weak_odr void @_ZN11Expressions2f1ILi1EEEvPAplngT_Li2E_i
+// CHECK-LABEL: define weak_odr void @_ZN11Expressions2f1ILi1EEEvPAplngT_Li2E_i
template <int i> void f1(int (*)[(-i) + 2]) { };
template void f1<1>(int (*)[1]);
-// CHECK: define weak_odr void @_ZN11Expressions2f2ILi1EEEvPApsT__i
+// CHECK-LABEL: define weak_odr void @_ZN11Expressions2f2ILi1EEEvPApsT__i
template <int i> void f2(int (*)[+i]) { };
template void f2<1>(int (*)[1]);
// Binary operators.
-// CHECK: define weak_odr void @_ZN11Expressions2f3ILi1EEEvPAplT_T__i
+// CHECK-LABEL: define weak_odr void @_ZN11Expressions2f3ILi1EEEvPAplT_T__i
template <int i> void f3(int (*)[i+i]) { };
template void f3<1>(int (*)[2]);
-// CHECK: define weak_odr void @_ZN11Expressions2f4ILi1EEEvPAplplLi2ET_T__i
+// CHECK-LABEL: define weak_odr void @_ZN11Expressions2f4ILi1EEEvPAplplLi2ET_T__i
template <int i> void f4(int (*)[2 + i+i]) { };
template void f4<1>(int (*)[4]);
// The ternary operator.
-// CHECK: define weak_odr void @_ZN11Expressions2f4ILb1EEEvPAquT_Li1ELi2E_i
+// CHECK-LABEL: define weak_odr void @_ZN11Expressions2f4ILb1EEEvPAquT_Li1ELi2E_i
template <bool b> void f4(int (*)[b ? 1 : 2]) { };
template void f4<true>(int (*)[1]);
}
void *v;
};
-// CHECK: define %struct.Ops* @_ZN3OpsplERKS_
+// CHECK-LABEL: define %struct.Ops* @_ZN3OpsplERKS_
Ops& Ops::operator+(const Ops&) { return *this; }
-// CHECK: define %struct.Ops* @_ZN3OpsmiERKS_
+// CHECK-LABEL: define %struct.Ops* @_ZN3OpsmiERKS_
Ops& Ops::operator-(const Ops&) { return *this; }
-// CHECK: define %struct.Ops* @_ZN3OpsanERKS_
+// CHECK-LABEL: define %struct.Ops* @_ZN3OpsanERKS_
Ops& Ops::operator&(const Ops&) { return *this; }
-// CHECK: define %struct.Ops* @_ZN3OpsmlERKS_
+// CHECK-LABEL: define %struct.Ops* @_ZN3OpsmlERKS_
Ops& Ops::operator*(const Ops&) { return *this; }
// PR5861
T *allocate(int, const void*) { return 0; }
};
-// CHECK: define weak_odr i8* @_ZN6PR58615AllocIcNS_6PolicyINS_1PELb1EEEE8allocateEiPKv
+// CHECK-LABEL: define weak_odr i8* @_ZN6PR58615AllocIcNS_6PolicyINS_1PELb1EEEE8allocateEiPKv
template class Alloc<char>;
}
-// CHECK: define void @_Z1fU13block_pointerFiiiE
+// CHECK-LABEL: define void @_Z1fU13block_pointerFiiiE
void f(int (^)(int, int)) { }
void pr5966_foo() {
char buffer[1];
f(0.0, buffer);
}
- // CHECK: define void @_ZN5test05test0Ev()
- // CHECK: define linkonce_odr void @_ZN5test01fIdEEvT_RAszcl3ovlcvS1__EE_c(
+ // CHECK-LABEL: define void @_ZN5test05test0Ev()
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01fIdEEvT_RAszcl3ovlcvS1__EE_c(
void test1() {
char buffer[sizeof(int)];
f(1, buffer);
}
- // CHECK: define void @_ZN5test05test1Ev()
- // CHECK: define linkonce_odr void @_ZN5test01fIiEEvT_RAszcl3ovlcvS1__EE_c(
+ // CHECK-LABEL: define void @_ZN5test05test1Ev()
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01fIiEEvT_RAszcl3ovlcvS1__EE_c(
template <class T> void g(char (&buffer)[sizeof(T() + 5.0f)]) {}
void test2() {
char buffer[sizeof(float)];
g<float>(buffer);
}
- // CHECK: define linkonce_odr void @_ZN5test01gIfEEvRAszplcvT__ELf40a00000E_c(
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01gIfEEvRAszplcvT__ELf40a00000E_c(
template <class T> void h(char (&buffer)[sizeof(T() + 5.0)]) {}
void test3() {
char buffer[sizeof(double)];
h<float>(buffer);
}
- // CHECK: define linkonce_odr void @_ZN5test01hIfEEvRAszplcvT__ELd4014000000000000E_c(
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01hIfEEvRAszplcvT__ELd4014000000000000E_c(
template <class T> void j(char (&buffer)[sizeof(T().buffer)]) {}
struct A { double buffer[128]; };
char buffer[1024];
j<A>(buffer);
}
- // CHECK: define linkonce_odr void @_ZN5test01jINS_1AEEEvRAszdtcvT__E6buffer_c(
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01jINS_1AEEEvRAszdtcvT__E6buffer_c(
template <class T> void k(char (&buffer)[sizeof(T() + 0.0f)]) {}
void test5() {
char buffer[sizeof(float)];
k<float>(buffer);
}
- // CHECK: define linkonce_odr void @_ZN5test01kIfEEvRAszplcvT__ELf00000000E_c(
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test01kIfEEvRAszplcvT__ELf00000000E_c(
}
namespace test1 {
template<typename T> struct X { };
template<template<class> class Y, typename T> void f(Y<T>) { }
- // CHECK: define weak_odr void @_ZN5test11fINS_1XEiEEvT_IT0_E
+ // CHECK-LABEL: define weak_odr void @_ZN5test11fINS_1XEiEEvT_IT0_E
template void f(X<int>);
}
-// CHECK: define internal void @_ZL27functionWithInternalLinkagev()
+// CHECK-LABEL: define internal void @_ZL27functionWithInternalLinkagev()
static void functionWithInternalLinkage() { }
void g() { functionWithInternalLinkage(); }
return read_member(obj);
}
- // CHECK: define linkonce_odr i32 @_ZN5test211read_memberINS_1AEEEDtptcvPT_Li0E6memberERS2_(
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN5test211read_memberINS_1AEEEDtptcvPT_Li0E6memberERS2_(
}
// rdar://problem/9280586
struct Path2 : AmbiguousBase { double p; };
struct Derived : Path1, Path2 { };
- // CHECK: define linkonce_odr i32 @_ZN5test38get_ab_1INS_7DerivedEEEDtptcvPT_Li0Esr5Path1E2abERS2_(
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN5test38get_ab_1INS_7DerivedEEEDtptcvPT_Li0Esr5Path1E2abERS2_(
template <class T> decltype(((T*) 0)->Path1::ab) get_ab_1(T &ref) { return ref.Path1::ab; }
- // CHECK: define linkonce_odr i32 @_ZN5test38get_ab_2INS_7DerivedEEEDtptcvPT_Li0Esr5Path2E2abERS2_(
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN5test38get_ab_2INS_7DerivedEEEDtptcvPT_Li0Esr5Path2E2abERS2_(
template <class T> decltype(((T*) 0)->Path2::ab) get_ab_2(T &ref) { return ref.Path2::ab; }
- // CHECK: define linkonce_odr float @_ZN5test37get_p_1INS_7DerivedEEEDtptcvPT_Li0Esr5Path1E1pERS2_(
+ // CHECK-LABEL: define linkonce_odr float @_ZN5test37get_p_1INS_7DerivedEEEDtptcvPT_Li0Esr5Path1E1pERS2_(
template <class T> decltype(((T*) 0)->Path1::p) get_p_1(T &ref) { return ref.Path1::p; }
- // CHECK: define linkonce_odr double @_ZN5test37get_p_2INS_7DerivedEEEDtptcvPT_Li0Esr5Path2E1pERS2_(
+ // CHECK-LABEL: define linkonce_odr double @_ZN5test37get_p_2INS_7DerivedEEEDtptcvPT_Li0Esr5Path2E1pERS2_(
template <class T> decltype(((T*) 0)->Path2::p) get_p_2(T &ref) { return ref.Path2::p; }
Derived obj;
}
}
-// CHECK: define void @_ZN5test41gEPNS_3zedIXadL_ZNS_3foo3barEEEEE
+// CHECK-LABEL: define void @_ZN5test41gEPNS_3zedIXadL_ZNS_3foo3barEEEEE
namespace test4 {
struct foo { int bar; };
template <int (foo::*)>
void g(zed<&foo::bar>*)
{}
}
-// CHECK: define void @_ZN5test51gEPNS_3zedIXadL_ZNS_3foo3barEEEEE
+// CHECK-LABEL: define void @_ZN5test51gEPNS_3zedIXadL_ZNS_3foo3barEEEEE
namespace test5 {
struct foo { static int bar; };
template <int *>
void g(zed<&foo::bar>*)
{}
}
-// CHECK: define void @_ZN5test61gEPNS_3zedIXadL_ZNS_3foo3barEvEEEE
+// CHECK-LABEL: define void @_ZN5test61gEPNS_3zedIXadL_ZNS_3foo3barEvEEEE
namespace test6 {
struct foo { int bar(); };
template <int (foo::*)()>
void g(zed<&foo::bar>*)
{}
}
-// CHECK: define void @_ZN5test71gEPNS_3zedIXadL_ZNS_3foo3barEvEEEE
+// CHECK-LABEL: define void @_ZN5test71gEPNS_3zedIXadL_ZNS_3foo3barEvEEEE
namespace test7 {
struct foo { static int bar(); };
template <int (*f)()>
void g(zed<&foo::bar>*)
{}
}
-// CHECK: define weak_odr void @_ZN5test81AILZNS_1B5valueEEE3incEv
+// CHECK-LABEL: define weak_odr void @_ZN5test81AILZNS_1B5valueEEE3incEv
namespace test8 {
template <int &counter> class A { void inc() { counter++; } };
class B { public: static int value; };
template <char P1> struct S {};
template <char P2> void f(struct S<false ? 'a' : P2> ) {}
- // CHECK: define weak_odr void @_ZN6test101fILc3EEEvNS_1SIXquLb0ELc97ET_EEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test101fILc3EEEvNS_1SIXquLb0ELc97ET_EEE(
template void f<(char) 3>(struct S<3>);
}
template <template<class> class T> void foo(const A<T> &a) {}
- // CHECK: define weak_odr void @_ZN6test133fooINS_1BEEEvRKNS_1AIT_EE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test133fooINS_1BEEEvRKNS_1AIT_EE(
template void foo(const A<B> &a);
}
struct S {
static int a(), x;
};
- // CHECK: define i32 @_ZN6test141S1aEv
+ // CHECK-LABEL: define i32 @_ZN6test141S1aEv
// CHECK: load i32* @_ZN6test141S1xE
int S::a() { return S::x; }
}
template <int I> void f(S<I + e>) {}
- // CHECK: define weak_odr void @_ZN6test151fILi7EEEvNS_1SIXplT_LNS_1EE3EEEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test151fILi7EEEvNS_1SIXplT_LNS_1EE3EEEE(
template void f<7>(S<7 + e>);
}
template <class T> A<sizeof(T::foo())> func(void);
- // CHECK: define void @_ZN6test174testEv()
+ // CHECK-LABEL: define void @_ZN6test174testEv()
// CHECK: call {{.*}} @_ZN6test174funcINS_1BEEENS_1AIXszclsrT_3fooEEEEv()
void test() {
func<B>();
template <typename T> void f(S<&T::operator&>) {}
template void f<A>(S<&A::operator&>);
- // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_plEEE
- // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_miEEE
- // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_mlEEE
- // CHECK: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_anEEE
+ // CHECK-LABEL: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_plEEE
+ // CHECK-LABEL: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_miEEE
+ // CHECK-LABEL: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_mlEEE
+ // CHECK-LABEL: define weak_odr void @_ZN6test181fINS_1AEEEvNS_1SIXadsrT_anEEE
}
// rdar://problem/8332117
template <typename T> void g (S<&T::operator int>) {}
template <typename T> void g (S<&T::template operator- <double> >) {}
- // CHECK: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_1fIiEEEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_1fIiEEEE(
template void g<A>(S<&A::f<int> >);
- // CHECK: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_plEEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_plEEE(
template void g<A>(S<&A::operator+>);
- // CHECK: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_cviEEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_cviEEE(
template void g<A>(S<&A::operator int>);
- // CHECK: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_miIdEEEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test191gINS_1AEEEvNS_1SIXadsrT_miIdEEEE(
template void g<A>(S<&A::operator-<double> >);
}
template <class T> T *f(const T&);
template <class T> T *f(T*);
- // CHECK: define weak_odr void @_ZN6test205test0IiEEvDTcl1fIPT_ELi0EEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test205test0IiEEvDTcl1fIPT_ELi0EEE(
template <class T> void test0(decltype(f<T*>(0))) {}
template void test0<int>(decltype(f<int*>(0)));
- // CHECK: define weak_odr void @_ZN6test205test1IiEEvDTcl1fIEcvT__EEE(
+ // CHECK-LABEL: define weak_odr void @_ZN6test205test1IiEEvDTcl1fIEcvT__EEE(
template <class T> void test1(decltype(f<>(T()))) {}
template void test1<int>(decltype(f<>(int())));
}
// rdar:// 8620510
namespace test21 {
- // CHECK: define void @_ZN6test2112vla_arg_funcEiPA_i(
+ // CHECK-LABEL: define void @_ZN6test2112vla_arg_funcEiPA_i(
void vla_arg_func(int X, int a[X][X]) {}
}
namespace test22 {
- // CHECK: define void @_ZN6test221fEDn(
+ // CHECK-LABEL: define void @_ZN6test221fEDn(
void f(decltype(nullptr)) { }
}
namespace test23 {
typedef void * const vpc;
- // CHECK: define void @_ZN6test231fERA10_KPv(
+ // CHECK-LABEL: define void @_ZN6test231fERA10_KPv(
void f(vpc (&)[10]) {}
typedef vpc vpca5[5];
void f(vpca5 volatile (&)[10]) {}
- // CHECK: define void @_ZN6test231fERA10_A5_VKPv(
+ // CHECK-LABEL: define void @_ZN6test231fERA10_A5_VKPv(
}
namespace test24 {
void g(int);
template<class T> auto f3(T p)->decltype(g(p)) {}
- // CHECK: define weak_odr i32 @_ZN6test312f1IiEEiT_(
+ // CHECK-LABEL: define weak_odr i32 @_ZN6test312f1IiEEiT_(
template int f1(int);
- // CHECK: define weak_odr i32 @_ZN6test312f2IiEEDtfp_ET_
+ // CHECK-LABEL: define weak_odr i32 @_ZN6test312f2IiEEDtfp_ET_
template int f2(int);
- // CHECK: define weak_odr void @_ZN6test312f3IiEEDTcl1gfp_EET_
+ // CHECK-LABEL: define weak_odr void @_ZN6test312f3IiEEDTcl1gfp_EET_
template void f3(int);
}
template<typename T>
void f(decltype(sizeof(decltype(T() + T())))) {}
- // CHECK: define weak_odr void @_ZN6test341fIiEEvDTstDTplcvT__EcvS1__EEE
+ // CHECK-LABEL: define weak_odr void @_ZN6test341fIiEEvDTstDTplcvT__EcvS1__EEE
template void f<int>(decltype(sizeof(1)));
// Mangling for non-instantiation-dependent sizeof expressions.
template<unsigned N>
void f2(int (&)[N + sizeof(int*)]) {}
- // CHECK: define weak_odr void @_ZN6test342f2ILj4EEEvRAplT_Lm8E_i
+ // CHECK-LABEL: define weak_odr void @_ZN6test342f2ILj4EEEvRAplT_Lm8E_i
template void f2<4>(int (&)[4 + sizeof(int*)]);
// Mangling for non-instantiation-dependent sizeof expressions
template<unsigned long long N>
void f3(int (&)[N + sizeof(int*)]) {}
- // CHECK: define weak_odr void @_ZN6test342f3ILy4EEEvRAplT_Ly8E_i
+ // CHECK-LABEL: define weak_odr void @_ZN6test342f3ILy4EEEvRAplT_Ly8E_i
template void f3<4>(int (&)[4 + sizeof(int*)]);
// Mangling for instantiation-dependent sizeof() expressions as
template<typename T> void f4(::test34::A<sizeof(sizeof(decltype(T() + T())))>) { }
- // CHECK: define weak_odr void @_ZN6test342f4IiEEvNS_1AIXszstDTplcvT__EcvS2__EEEEE
+ // CHECK-LABEL: define weak_odr void @_ZN6test342f4IiEEvNS_1AIXszstDTplcvT__EcvS2__EEEEE
template void f4<int>(A<sizeof(sizeof(int))>);
}
template<typename T>
void f1(decltype(sizeof(&T::template operator+<int>))) {}
- // CHECK: define weak_odr void @_ZN6test352f1INS_1AEEEvDTszadsrT_plIiEE
+ // CHECK-LABEL: define weak_odr void @_ZN6test352f1INS_1AEEEvDTszadsrT_plIiEE
template void f1<A>(__SIZE_TYPE__);
}
};
template<typename T> void func(T) { }
void test() {
- // CHECK: define linkonce_odr void @_ZN6test374funcINS_3fooUt_EEEvT_
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test374funcINS_3fooUt_EEEvT_
func(foo().a);
- // CHECK: define linkonce_odr void @_ZN6test374funcINS_3fooUt0_EEEvT_
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test374funcINS_3fooUt0_EEEvT_
func(*foo::c());
- // CHECK: define linkonce_odr void @_ZN6test374funcINS_3fooUt1_EEEvT_
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test374funcINS_3fooUt1_EEEvT_
func(foo().d);
}
}
-// CHECK: define void @_Z6ASfuncPU3AS3i
+// CHECK-LABEL: define void @_Z6ASfuncPU3AS3i
void ASfunc(__attribute__((address_space(3))) int* x) {}
namespace test38 {
- // CHECK: define linkonce_odr void @_ZN6test384funcINS_3fooUt_EEEvT_
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test384funcINS_3fooUt_EEEvT_
typedef struct {
struct {
} a;
}
namespace test39 {
- // CHECK: define internal void @"_ZN6test394funcINS_3$_03$_1EEEvT_"
+ // CHECK-LABEL: define internal void @"_ZN6test394funcINS_3$_03$_1EEEvT_"
typedef struct {
struct {} a;
} *foo;
extern C *c_ptr;
- // CHECK: define i32 @_ZN5test44testEv()
+ // CHECK-LABEL: define i32 @_ZN5test44testEv()
int test() {
// CHECK: load {{.*}} @_ZN5test45c_ptrE
// CHECK-NEXT: bitcast
return (a->*fp)();
}
-// CHECK: define i32 @_Z2g1v()
+// CHECK-LABEL: define i32 @_Z2g1v()
// CHECK: ret i32 1
int g1() {
A a;
return f(&a, &A::vf1);
}
-// CHECK: define i32 @_Z2g2v()
+// CHECK-LABEL: define i32 @_Z2g2v()
// CHECK: ret i32 2
int g2() {
A a;
fooptr p;
};
- // CODE-LP64: define void @_ZN5test94testEv(
+ // CODE-LP64-LABEL: define void @_ZN5test94testEv(
// CODE-LP64: alloca i32
// CODE-LP64-NEXT: ret void
void test() {
void g(int, ...);
};
-// CHECK: define void @_ZN1C1fEv
+// CHECK-LABEL: define void @_ZN1C1fEv
void C::f() {
}
-// CHECK: define void @_Z5test1v
+// CHECK-LABEL: define void @_Z5test1v
void test1() {
C c;
virtual void v() {}
};
-// CHECK: define void @_ZN1S1fEv
+// CHECK-LABEL: define void @_ZN1S1fEv
void S::f() {
}
// CHECK: define linkonce_odr void @_ZN1SC1Ev{{.*}} unnamed_addr
// S::f_inline1()
-// CHECK: define linkonce_odr void @_ZN1S9f_inline1Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN1S9f_inline1Ev
// S::f_inline2()
-// CHECK: define linkonce_odr void @_ZN1S9f_inline2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN1S9f_inline2Ev
// S::g()
-// CHECK: define linkonce_odr void @_ZN1S1gEv
+// CHECK-LABEL: define linkonce_odr void @_ZN1S1gEv
// S::~S()
// CHECK: define linkonce_odr void @_ZN1SD1Ev{{.*}} unnamed_addr
T operator+(const T&);
};
-// CHECK: define void @_Z5test3v
+// CHECK-LABEL: define void @_Z5test3v
void test3() {
T t1, t2;
int f() { return a; }
-// CHECK: define internal void @__cxx_global_var_init
+// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK-NOT: }
// CHECK: call {{.*}}@"[[CONSTRUCT_GLOBAL:.*]]C1Ev"
int i;
};
-// CHECK: define i32 @_Z1fv() #0
+// CHECK-LABEL: define i32 @_Z1fv() #0
int f() {
B b;
template<typename T> B::B(T) {}
-// CHECK: define weak_odr void @_ZN1BC1IiEET_(%struct.B* %this, i32) unnamed_addr
-// CHECK: define weak_odr void @_ZN1BC2IiEET_(%struct.B* %this, i32) unnamed_addr
+// CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(%struct.B* %this, i32) unnamed_addr
+// CHECK-LABEL: define weak_odr void @_ZN1BC2IiEET_(%struct.B* %this, i32) unnamed_addr
template B::B(int);
template<typename T>
void foo();
void __cdecl foo();
void __cdecl foo() {}
-// GCABI: define void @_Z3foov()
+// GCABI-LABEL: define void @_Z3foov()
// MSABI: define void @"\01?foo@@YAXXZ"
void __cdecl bar();
void bar();
void bar() {}
-// GCABI: define void @_Z3barv()
+// GCABI-LABEL: define void @_Z3barv()
// MSABI: define void @"\01?bar@@YAXXZ"
// Test that it's OK to mark either the method declaration or method definition
};
void METHOD_CC A::baz() {}
-// GCABI: define void @_ZN1A3bazEv
+// GCABI-LABEL: define void @_ZN1A3bazEv
// MSABI: define x86_thiscallcc void @"\01?baz@A@@QAEXXZ"
void A::qux() {}
-// GCABI: define void @_ZN1A3quxEv
+// GCABI-LABEL: define void @_ZN1A3quxEv
// MSABI: define x86_thiscallcc void @"\01?qux@A@@QAEXXZ"
void __cdecl static_baz() {}
-// GCABI: define void @_Z10static_bazv
+// GCABI-LABEL: define void @_Z10static_bazv
// MSABI: define void @"\01?static_baz@@YAXXZ"
void static_qux() {}
-// GCABI: define void @_Z10static_quxv
+// GCABI-LABEL: define void @_Z10static_quxv
// MSABI: define void @"\01?static_qux@@YAXXZ"
// Returning structs that fit into a register.
Small small_return() { return Small(); }
-// LINUX: define void @_Z12small_returnv(%struct.Small* noalias sret %agg.result)
+// LINUX-LABEL: define void @_Z12small_returnv(%struct.Small* noalias sret %agg.result)
// WIN32: define i32 @"\01?small_return@@YA?AUSmall@@XZ"()
// WIN64: define i32 @"\01?small_return@@YA?AUSmall@@XZ"()
Medium medium_return() { return Medium(); }
-// LINUX: define void @_Z13medium_returnv(%struct.Medium* noalias sret %agg.result)
+// LINUX-LABEL: define void @_Z13medium_returnv(%struct.Medium* noalias sret %agg.result)
// WIN32: define i64 @"\01?medium_return@@YA?AUMedium@@XZ"()
// WIN64: define i64 @"\01?medium_return@@YA?AUMedium@@XZ"()
// Returning structs that fit into a register but are not POD.
SmallCpp11NotCpp03Pod small_non_pod_return() { return SmallCpp11NotCpp03Pod(); }
-// LINUX: define void @_Z20small_non_pod_returnv(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result)
+// LINUX-LABEL: define void @_Z20small_non_pod_returnv(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result)
// WIN32: define void @"\01?small_non_pod_return@@YA?AUSmallCpp11NotCpp03Pod@@XZ"(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result)
// WIN64: define void @"\01?small_non_pod_return@@YA?AUSmallCpp11NotCpp03Pod@@XZ"(%struct.SmallCpp11NotCpp03Pod* noalias sret %agg.result)
SmallWithCtor small_with_ctor_return() { return SmallWithCtor(); }
-// LINUX: define void @_Z22small_with_ctor_returnv(%struct.SmallWithCtor* noalias sret %agg.result)
+// LINUX-LABEL: define void @_Z22small_with_ctor_returnv(%struct.SmallWithCtor* noalias sret %agg.result)
// WIN32: define void @"\01?small_with_ctor_return@@YA?AUSmallWithCtor@@XZ"(%struct.SmallWithCtor* noalias sret %agg.result)
// WIN64: define void @"\01?small_with_ctor_return@@YA?AUSmallWithCtor@@XZ"(%struct.SmallWithCtor* noalias sret %agg.result)
SmallWithVftable small_with_vftable_return() { return SmallWithVftable(); }
-// LINUX: define void @_Z25small_with_vftable_returnv(%struct.SmallWithVftable* noalias sret %agg.result)
+// LINUX-LABEL: define void @_Z25small_with_vftable_returnv(%struct.SmallWithVftable* noalias sret %agg.result)
// WIN32: define void @"\01?small_with_vftable_return@@YA?AUSmallWithVftable@@XZ"(%struct.SmallWithVftable* noalias sret %agg.result)
// WIN64: define void @"\01?small_with_vftable_return@@YA?AUSmallWithVftable@@XZ"(%struct.SmallWithVftable* noalias sret %agg.result)
MediumWithCopyCtor medium_with_copy_ctor_return() { return MediumWithCopyCtor(); }
-// LINUX: define void @_Z28medium_with_copy_ctor_returnv(%struct.MediumWithCopyCtor* noalias sret %agg.result)
+// LINUX-LABEL: define void @_Z28medium_with_copy_ctor_returnv(%struct.MediumWithCopyCtor* noalias sret %agg.result)
// WIN32: define void @"\01?medium_with_copy_ctor_return@@YA?AUMediumWithCopyCtor@@XZ"(%struct.MediumWithCopyCtor* noalias sret %agg.result)
// WIN64: define void @"\01?medium_with_copy_ctor_return@@YA?AUMediumWithCopyCtor@@XZ"(%struct.MediumWithCopyCtor* noalias sret %agg.result)
// Returning a large struct that doesn't fit into a register.
Big big_return() { return Big(); }
-// LINUX: define void @_Z10big_returnv(%struct.Big* noalias sret %agg.result)
+// LINUX-LABEL: define void @_Z10big_returnv(%struct.Big* noalias sret %agg.result)
// WIN32: define void @"\01?big_return@@YA?AUBig@@XZ"(%struct.Big* noalias sret %agg.result)
// WIN64: define void @"\01?big_return@@YA?AUBig@@XZ"(%struct.Big* noalias sret %agg.result)
void small_arg(Small s) {}
-// LINUX: define void @_Z9small_arg5Small(%struct.Small* byval align 4 %s)
+// LINUX-LABEL: define void @_Z9small_arg5Small(%struct.Small* byval align 4 %s)
// WIN32: define void @"\01?small_arg@@YAXUSmall@@@Z"(%struct.Small* byval align 4 %s)
// WIN64: define void @"\01?small_arg@@YAXUSmall@@@Z"(i32 %s.coerce)
void medium_arg(Medium s) {}
-// LINUX: define void @_Z10medium_arg6Medium(%struct.Medium* byval align 4 %s)
+// LINUX-LABEL: define void @_Z10medium_arg6Medium(%struct.Medium* byval align 4 %s)
// WIN32: define void @"\01?medium_arg@@YAXUMedium@@@Z"(%struct.Medium* byval align 4 %s)
// WIN64: define void @"\01?medium_arg@@YAXUMedium@@@Z"(i64 %s.coerce)
void small_arg_with_ctor(SmallWithCtor s) {}
-// LINUX: define void @_Z19small_arg_with_ctor13SmallWithCtor(%struct.SmallWithCtor* byval align 4 %s)
+// LINUX-LABEL: define void @_Z19small_arg_with_ctor13SmallWithCtor(%struct.SmallWithCtor* byval align 4 %s)
// WIN32: define void @"\01?small_arg_with_ctor@@YAXUSmallWithCtor@@@Z"(%struct.SmallWithCtor* byval align 4 %s)
// WIN64: define void @"\01?small_arg_with_ctor@@YAXUSmallWithCtor@@@Z"(i32 %s.coerce)
// WIN32: }
void small_arg_with_vftable(SmallWithVftable s) {}
-// LINUX: define void @_Z22small_arg_with_vftable16SmallWithVftable(%struct.SmallWithVftable* %s)
+// LINUX-LABEL: define void @_Z22small_arg_with_vftable16SmallWithVftable(%struct.SmallWithVftable* %s)
// WIN32: define void @"\01?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(%struct.SmallWithVftable* byval align 4 %s)
// WIN64: define void @"\01?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(%struct.SmallWithVftable* byval %s)
void medium_arg_with_copy_ctor(MediumWithCopyCtor s) {}
-// LINUX: define void @_Z25medium_arg_with_copy_ctor18MediumWithCopyCtor(%struct.MediumWithCopyCtor* %s)
+// LINUX-LABEL: define void @_Z25medium_arg_with_copy_ctor18MediumWithCopyCtor(%struct.MediumWithCopyCtor* %s)
// WIN32: define void @"\01?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* byval align 4 %s)
// WIN64: define void @"\01?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* byval %s)
void big_arg(Big s) {}
-// LINUX: define void @_Z7big_arg3Big(%struct.Big* byval align 4 %s)
+// LINUX-LABEL: define void @_Z7big_arg3Big(%struct.Big* byval align 4 %s)
// WIN32: define void @"\01?big_arg@@YAXUBig@@@Z"(%struct.Big* byval align 4 %s)
// WIN64: define void @"\01?big_arg@@YAXUBig@@@Z"(%struct.Big* %s)
// CHECK: @_ZTV1S = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1S to i8*), i8* bitcast (i32 (%struct.S*)* @_ZN1S4testEv to i8*)]
-// CHECK: define i32 @_Z2fnv()
+// CHECK-LABEL: define i32 @_Z2fnv()
// CHECK: call void @_ZN1SC1Ev(%struct.S* %s)
// CHECK: %{{[.0-9A-Z_a-z]+}} = call i32 @_ZN1S4testEv(%struct.S* %s)
-// CHECK: define linkonce_odr void @_ZN1SC1Ev(%struct.S* %this)
+// CHECK-LABEL: define linkonce_odr void @_ZN1SC1Ev(%struct.S* %this)
// CHECK: call void @_ZN1SC2Ev(%struct.S* %{{[.0-9A-Z_a-z]+}})
-// CHECK: define linkonce_odr i32 @_ZN1S4testEv(%struct.S* %this)
+// CHECK-LABEL: define linkonce_odr i32 @_ZN1S4testEv(%struct.S* %this)
// CHECK: %{{[.0-9A-Z_a-z]+}} = call i32 @_ZN1I4testEv(%__interface.I* %{{[.0-9A-Z_a-z]+}})
-// CHECK: define linkonce_odr i32 @_ZN1I4testEv(%__interface.I* %this)
+// CHECK-LABEL: define linkonce_odr i32 @_ZN1I4testEv(%__interface.I* %this)
// CHECK: ret i32 1
-// CHECK: define linkonce_odr void @_ZN1SC2Ev(%struct.S* %this)
+// CHECK-LABEL: define linkonce_odr void @_ZN1SC2Ev(%struct.S* %this)
// CHECK: call void @_ZN1IC2Ev(%__interface.I* %{{[.0-9A-Z_a-z]+}})
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1S, i64 0, i64 2), i8*** %{{[.0-9A-Z_a-z]+}}
-// CHECK: define linkonce_odr void @_ZN1IC2Ev(%__interface.I* %this)
+// CHECK-LABEL: define linkonce_odr void @_ZN1IC2Ev(%__interface.I* %this)
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1I, i64 0, i64 2), i8*** %{{[.0-9A-Z_a-z]+}}
-// CHECK-NOT: define linkonce_odr %__interface.I* @_ZN1IaSERKS_(%__interface.I* %this, %__interface.I*)
-// CHECK-NOT: define linkonce_odr %__interface.I* @_ZN1IaSEOS_(%__interface.I* %this, %__interface.I*)
+// CHECK-NOT-LABEL: define linkonce_odr %__interface.I* @_ZN1IaSERKS_(%__interface.I* %this, %__interface.I*)
+// CHECK-NOT-LABEL: define linkonce_odr %__interface.I* @_ZN1IaSEOS_(%__interface.I* %this, %__interface.I*)
~Throws();
};
-// CHECK: define void @_Z7cleanupi
+// CHECK-LABEL: define void @_Z7cleanupi
void cleanup(int n) {
// CHECK: invoke void @_ZN6ThrowsC1Ei
// CHECK-NEXT: to label %{{[^ ]+}} unwind label %[[LPAD:[^ ]+]]
}
-// CHECK: define void @_Z7cleanupv
+// CHECK-LABEL: define void @_Z7cleanupv
void cleanup() {
// CHECK: invoke void @_ZN6ThrowsC1Ei
// CHECK-NEXT: to label %{{[^ ]+}} unwind label %[[LPAD2:[^ ]+]]
// RUN: %clang_cc1 -std=c++11 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
-// CHECK: define void @_Z2fni
+// CHECK-LABEL: define void @_Z2fni
void fn(int n) {
// CHECK: icmp ult i{{32|64}} %{{[^ ]+}}, 3
// CHECK: store i32 1
new int[n] { 1, 2, 3 };
}
-// CHECK: define void @_Z15const_underflowv
+// CHECK-LABEL: define void @_Z15const_underflowv
void const_underflow() {
// CHECK-NOT: icmp ult i{{32|64}} %{{[^ ]+}}, 3
// CHECK: call noalias i8* @_Zna{{.}}(i{{32|64}} -1)
new int[2] { 1, 2, 3 };
}
-// CHECK: define void @_Z11const_exactv
+// CHECK-LABEL: define void @_Z11const_exactv
void const_exact() {
// CHECK-NOT: icmp ult i{{32|64}} %{{[^ ]+}}, 3
// CHECK-NOT: icmp eq i32*
new int[3] { 1, 2, 3 };
}
-// CHECK: define void @_Z16const_sufficientv
+// CHECK-LABEL: define void @_Z16const_sufficientv
void const_sufficient() {
// CHECK-NOT: icmp ult i{{32|64}} %{{[^ ]+}}, 3
new int[4] { 1, 2, 3 };
return new(1, 2, 3.45, 100) A;
}
-// CHECK: define void @_Z3t11i
+// CHECK-LABEL: define void @_Z3t11i
struct B { int a; };
struct Bmemptr { int Bmemptr::* memptr; int a; };
struct Empty { };
// We don't need to initialize an empty class.
-// CHECK: define void @_Z3t12v
+// CHECK-LABEL: define void @_Z3t12v
void t12() {
// CHECK: call noalias i8* @_Znam
// CHECK-NOT: br
}
// Zero-initialization
-// CHECK: define void @_Z3t13i
+// CHECK-LABEL: define void @_Z3t13i
void t13(int n) {
// CHECK: call noalias i8* @_Znwm
// CHECK: store i32 0, i32*
namespace test15 {
struct A { A(); ~A(); };
- // CHECK: define void @_ZN6test155test0EPv(
+ // CHECK-LABEL: define void @_ZN6test155test0EPv(
// CHECK: [[P:%.*]] = load i8*
// CHECK-NEXT: icmp eq i8* [[P]], null
// CHECK-NEXT: br i1
new (p) A();
}
- // CHECK: define void @_ZN6test155test1EPv(
+ // CHECK-LABEL: define void @_ZN6test155test1EPv(
// CHECK: [[P:%.*]] = load i8**
// CHECK-NEXT: icmp eq i8* [[P]], null
// CHECK-NEXT: br i1
// TODO: it's okay if all these size calculations get dropped.
// FIXME: maybe we should try to throw on overflow?
- // CHECK: define void @_ZN6test155test2EPvi(
+ // CHECK-LABEL: define void @_ZN6test155test2EPvi(
// CHECK: [[N:%.*]] = load i32*
// CHECK-NEXT: [[T0:%.*]] = sext i32 [[N]] to i64
// CHECK-NEXT: [[T1:%.*]] = icmp slt i64 [[T0]], 0
}
namespace PR10197 {
- // CHECK: define weak_odr void @_ZN7PR101971fIiEEvv()
+ // CHECK-LABEL: define weak_odr void @_ZN7PR101971fIiEEvv()
template<typename T>
void f() {
// CHECK: [[CALL:%.*]] = call noalias i8* @_Znwm
namespace PR11523 {
class MyClass;
typedef int MyClass::* NewTy;
- // CHECK: define i64* @_ZN7PR115231fEv
+ // CHECK-LABEL: define i64* @_ZN7PR115231fEv
// CHECK: store i64 -1
NewTy* f() { return new NewTy[2](); }
}
namespace PR13380 {
struct A { A() {} };
struct B : public A { int x; };
- // CHECK: define i8* @_ZN7PR133801fEv
+ // CHECK-LABEL: define i8* @_ZN7PR133801fEv
// CHECK: call noalias i8* @_Znam(
// CHECK: call void @llvm.memset.p0i8
// CHECK-NEXT: call void @_ZN7PR133801BC1Ev
namespace N3664 {
struct S { S() throw(int); };
- // CHECK-LABEL: define void @_ZN5N36641fEv
+ // CHECK-LABEL-LABEL: define void @_ZN5N36641fEv
void f() {
// CHECK: call noalias i8* @_Znwm(i64 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
int *p = new int;
// FIXME: Can we mark this noalias?
// CHECK: declare i8* @_ZnamRKSt9nothrow_t(i64, {{.*}}) [[ATTR_NOBUILTIN_NOUNWIND]]
- // CHECK-LABEL: define void @_ZN5N36641gEv
+ // CHECK-LABEL-LABEL: define void @_ZN5N36641gEv
void g() {
// It's OK for there to be attributes here, so long as we don't have a
// 'builtin' attribute.
gs = gs;
ls = gs;
}
-// CHECK: define void @_Z3foov()
+// CHECK-LABEL: define void @_Z3foov()
// CHECK: %[[LS:.*]] = alloca %struct.s, align 4
// CHECK-NEXT: %[[ZERO:.*]] = bitcast %struct.s* %[[LS]] to i8*
// CHECK-NEXT: %[[ONE:.*]] = bitcast %struct.s* %[[LS]] to i8*
s = s;
s.y = gs;
}
-// CHECK: define void @_Z3feev()
+// CHECK-LABEL: define void @_Z3feev()
// CHECK: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
void gorf(void) {
gd = gd;
}
-// CHECK: define void @_Z4gorfv()
+// CHECK-LABEL: define void @_Z4gorfv()
// CHECK: call void @llvm.memcpy.{{.*}}(i8* getelementptr inbounds (%struct.d* @gd, i32 0, i32 0, i32 0, i32 0, i32 0), i8* getelementptr inbounds (%struct.d* @gd, i32 0, i32 0, i32 0, i32 0, i32 0), i64 132, i32 4, i1 true)
foo();
}
}
-// CHECK: define void @_ZN5test04testEv()
+// CHECK-LABEL: define void @_ZN5test04testEv()
// CHECK: [[EXN:%.*]] = alloca i8*
// This goes to the terminate lpad.
// CHECK: invoke void @_ZN5test01AC1Ev(
// CHECK-NEXT: call void @__clang_call_terminate(i8* [[T0]])
// CHECK-NEXT: unreachable
-// CHECK: define linkonce_odr hidden void @__clang_call_terminate(
+// CHECK-LABEL: define linkonce_odr hidden void @__clang_call_terminate(
// CHECK: call i8* @__cxa_begin_catch(
// CHECK-NEXT: call void @_ZSt9terminatev()
// CHECK-NEXT: unreachable
~X();
};
-// CHECK: define void @_Z5test0v
-// CHECK-EH: define void @_Z5test0v
+// CHECK-LABEL: define void @_Z5test0v
+// CHECK-EH-LABEL: define void @_Z5test0v
X test0() {
X x;
// CHECK: call {{.*}} @_ZN1XC1Ev
return x;
}
-// CHECK: define void @_Z5test1b(
-// CHECK-EH: define void @_Z5test1b(
+// CHECK-LABEL: define void @_Z5test1b(
+// CHECK-EH-LABEL: define void @_Z5test1b(
X test1(bool B) {
// CHECK: tail call {{.*}} @_ZN1XC1Ev
// CHECK-NEXT: ret void
// CHECK-EH-NEXT: ret void
}
-// CHECK: define void @_Z5test2b
-// CHECK-EH: define void @_Z5test2b
+// CHECK-LABEL: define void @_Z5test2b
+// CHECK-EH-LABEL: define void @_Z5test2b
X test2(bool B) {
// No NRVO.
extern "C" void exit(int) throw();
-// CHECK: define void @_Z5test4b
+// CHECK-LABEL: define void @_Z5test4b
X test4(bool B) {
{
// CHECK: tail call {{.*}} @_ZN1XC1Ev
}
#ifdef __EXCEPTIONS
-// CHECK-EH: define void @_Z5test5
+// CHECK-EH-LABEL: define void @_Z5test5
void may_throw();
X test5() {
try {
#endif
// rdar://problem/10430868
-// CHECK: define void @_Z5test6v
+// CHECK-LABEL: define void @_Z5test6v
X test6() {
X a __attribute__((aligned(8)));
return a;
A as[10] = { 5, 7 };
opaque();
}
- // CHECK: define void @_ZN5test04testEv()
+ // CHECK-LABEL: define void @_ZN5test04testEv()
// CHECK: [[AS:%.*]] = alloca [10 x [[A:%.*]]], align
// CHECK-NEXT: [[ENDVAR:%.*]] = alloca [[A]]*
// CHECK-NEXT: [[EXN:%.*]] = alloca i8*
void test() {
B v = { 5, 6, 7, 8 };
}
- // CHECK: define void @_ZN5test14testEv()
+ // CHECK-LABEL: define void @_ZN5test14testEv()
// CHECK: [[V:%.*]] = alloca [[B:%.*]], align 4
// CHECK-NEXT: alloca i8*
// CHECK-NEXT: alloca i32
void test() {
A v[4][7];
- // CHECK: define void @_ZN5test24testEv()
+ // CHECK-LABEL: define void @_ZN5test24testEv()
// CHECK: [[V:%.*]] = alloca [4 x [7 x [[A:%.*]]]], align 1
// CHECK-NEXT: alloca i8*
// CHECK-NEXT: alloca i32
CALL_AO(PackedMembers)
// Basic copy-assignment:
-// CHECK: define linkonce_odr %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* %this, %struct.Basic*)
+// CHECK-LABEL: define linkonce_odr %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* %this, %struct.Basic*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: tail call %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.Basic* %this
// PODMember copy-assignment:
-// CHECK: define linkonce_odr %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* %this, %struct.PODMember*)
+// CHECK-LABEL: define linkonce_odr %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* %this, %struct.PODMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: tail call %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.PODMember* %this
// PODLikeMember copy-assignment:
-// CHECK: define linkonce_odr %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember*)
+// CHECK-LABEL: define linkonce_odr %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: tail call %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.PODLikeMember* %this
// ArrayMember copy-assignment:
-// CHECK: define linkonce_odr %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* %this, %struct.ArrayMember*)
+// CHECK-LABEL: define linkonce_odr %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* %this, %struct.ArrayMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: tail call %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: ret %struct.ArrayMember* %this
// VolatileMember copy-assignment:
-// CHECK: define linkonce_odr %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* %this, %struct.VolatileMember*)
+// CHECK-LABEL: define linkonce_odr %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* %this, %struct.VolatileMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: load volatile i32* {{.*}}, align 4
// CHECK: store volatile i32 {{.*}}, align 4
// CHECK: ret %struct.VolatileMember* %this
// BitfieldMember copy-assignment:
-// CHECK: define linkonce_odr %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember*)
+// CHECK-LABEL: define linkonce_odr %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: tail call %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
// CHECK: ret %struct.BitfieldMember* %this
// InnerClass copy-assignment:
-// CHECK: define linkonce_odr %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember*)
+// CHECK-LABEL: define linkonce_odr %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: tail call %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.InnerClassMember* %this
// PackedMembers copy-assignment:
-// CHECK: define linkonce_odr %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* %this, %struct.PackedMembers*)
+// CHECK-LABEL: define linkonce_odr %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* %this, %struct.PackedMembers*)
// CHECK: tail call %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
// CHECK: ret %struct.PackedMembers* %this
CALL_CC(Basic)
// Basic copy-constructor:
-// CHECK: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic*)
+// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: tail call void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// PODMember copy-constructor:
-// CHECK: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: tail call void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// PODLikeMember copy-constructor:
-// CHECK: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: invoke void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: invoke void @_ZN7PODLikeD1Ev
// ArrayMember copy-constructor:
-// CHECK: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: tail call void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: ret void
// VolatileMember copy-constructor:
-// CHECK: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: load volatile i32* {{.*}}, align 4
// CHECK: store volatile i32 {{.*}}, align 4
// CHECK: ret void
// BitfieldMember copy-constructor:
-// CHECK: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: tail call void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
// CHECK: ret void
// InnerClass copy-constructor:
-// CHECK: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: tail call void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// ReferenceMember copy-constructor:
-// CHECK: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember*)
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: tail call void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: ret void
// BitfieldMember2 copy-constructor:
-// CHECK-2: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2*)
+// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2*)
// CHECK-2: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4, i1 false)
// CHECK-2: call void @_ZN6NonPODC1ERKS_
// CHECK-2: ret void
// PackedMembers copy-assignment:
-// CHECK: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers*)
+// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers*)
// CHECK: tail call void @_ZN6NonPODC1ERKS_
// CHECK: tail call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
// CHECK: ret void
A();
};
-// CHECK: define void @_ZN9ValueInit1AC2Ev(%"struct.ValueInit::A"* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN9ValueInit1AC2Ev(%"struct.ValueInit::A"* %this) unnamed_addr
// CHECK: store i64 -1, i64*
// CHECK: ret void
A::A() : a() {}
bool member;
};
- // CHECK: define i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
+ // CHECK-LABEL: define i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
bool &f(X &x, bool X::*member) {
// CHECK: {{bitcast.* to i8\*}}
// CHECK-NEXT: getelementptr inbounds i8*
};
A f();
X g() { return f().*&A::x; }
- // CHECK: define void @_ZN7PR130971gEv
+ // CHECK-LABEL: define void @_ZN7PR130971gEv
// CHECK: call void @_ZN7PR130971fEv
// CHECK-NOT: memcpy
// CHECK: call void @_ZN7PR130971XC1ERKS0_
void foo() {
}
#pragma GCC visibility pop
-// CHECK: define void @_Z3foov()
+// CHECK-LABEL: define void @_Z3foov()
bool f(bool *x) {
return *x;
}
-// CHECK: define zeroext i1 @_Z1fPb
+// CHECK-LABEL: define zeroext i1 @_Z1fPb
// CHECK: load i8* %{{[^ ]*}}, align 1, !range [[RANGE_i8_0_2:![^ ]*]]
// Only enum-tests follow. Ensure that after the bool test, no further range
// metadata shows up when strict enums are disabled.
-// NO-STRICT-ENUMS: define zeroext i1 @_Z1fPb
+// NO-STRICT-ENUMS-LABEL: define zeroext i1 @_Z1fPb
// NO-STRICT-ENUMS: load i8* %{{[^ ]*}}, align 1, !range
// NO-STRICT-ENUMS-NOT: !range
e1 g1(e1 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g1P2e1
+// CHECK-LABEL: define i32 @_Z2g1P2e1
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_0_1:![^ ]*]]
enum e2 { e2_a = 0 };
e2 g2(e2 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g2P2e2
+// CHECK-LABEL: define i32 @_Z2g2P2e2
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_0_1]]
enum e3 { e3_a = 16 };
e3 g3(e3 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g3P2e3
+// CHECK-LABEL: define i32 @_Z2g3P2e3
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_0_32:![^ ]*]]
enum e4 { e4_a = -16};
e4 g4(e4 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g4P2e4
+// CHECK-LABEL: define i32 @_Z2g4P2e4
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_m16_16:![^ ]*]]
enum e5 { e5_a = -16, e5_b = 16};
e5 g5(e5 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g5P2e5
+// CHECK-LABEL: define i32 @_Z2g5P2e5
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]]
enum e6 { e6_a = -1 };
e6 g6(e6 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g6P2e6
+// CHECK-LABEL: define i32 @_Z2g6P2e6
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_m1_1:![^ ]*]]
enum e7 { e7_a = -16, e7_b = 2};
e7 g7(e7 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g7P2e7
+// CHECK-LABEL: define i32 @_Z2g7P2e7
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_m16_16]]
enum e8 { e8_a = -17};
e8 g8(e8 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g8P2e8
+// CHECK-LABEL: define i32 @_Z2g8P2e8
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]]
enum e9 { e9_a = 17};
e9 g9(e9 *x) {
return *x;
}
-// CHECK: define i32 @_Z2g9P2e9
+// CHECK-LABEL: define i32 @_Z2g9P2e9
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_0_32]]
enum e10 { e10_a = -16, e10_b = 32};
e10 g10(e10 *x) {
return *x;
}
-// CHECK: define i32 @_Z3g10P3e10
+// CHECK-LABEL: define i32 @_Z3g10P3e10
// CHECK: load i32* %x, align 4, !range [[RANGE_i32_m64_64:![^ ]*]]
enum e11 {e11_a = 4294967296 };
enum e11 g11(enum e11 *x) {
return *x;
}
-// CHECK: define i64 @_Z3g11P3e11
+// CHECK-LABEL: define i64 @_Z3g11P3e11
// CHECK: load i64* %x, align {{[84]}}, !range [[RANGE_i64_0_2pow33:![^ ]*]]
enum e12 {e12_a = 9223372036854775808U };
enum e12 g12(enum e12 *x) {
return *x;
}
-// CHECK: define i64 @_Z3g12P3e12
+// CHECK-LABEL: define i64 @_Z3g12P3e12
// CHECK: load i64* %x, align {{[84]}}
// CHECK-NOT: range
// CHECK: ret
e13 g13(e13 *x) {
return *x;
}
-// CHECK: define signext i8 @_Z3g13P3e13
+// CHECK-LABEL: define signext i8 @_Z3g13P3e13
// CHECK: load i8* %x, align 1
// CHECK-NOT: range
// CHECK: ret
e14 g14(e14 *x) {
return *x;
}
-// CHECK: define i32 @_Z3g14P3e14
+// CHECK-LABEL: define i32 @_Z3g14P3e14
// CHECK: load i32* %x, align 4
// CHECK-NOT: range
// CHECK: ret
e15 g15(e15 *x) {
return *x;
}
-// CHECK: define i32 @_Z3g15P3e15
+// CHECK-LABEL: define i32 @_Z3g15P3e15
// CHECK: load i32* %x, align 4
// CHECK-NOT: range
// CHECK: ret
e16 g16(e16 *x) {
return *x;
}
-// CHECK: define i32 @_Z3g16P3e16
+// CHECK-LABEL: define i32 @_Z3g16P3e16
// CHECK: load i32* %x, align 4
// CHECK-NOT: range
// CHECK: ret
};
foo::foo() {
- // CHECK: define void @_ZN3fooC1Ev(%struct.foo* inreg %this)
- // CHECK: define void @_ZN3fooC2Ev(%struct.foo* inreg %this)
+ // CHECK-LABEL: define void @_ZN3fooC1Ev(%struct.foo* inreg %this)
+ // CHECK-LABEL: define void @_ZN3fooC2Ev(%struct.foo* inreg %this)
}
foo::~foo() {
- // CHECK: define void @_ZN3fooD1Ev(%struct.foo* inreg %this)
- // CHECK: define void @_ZN3fooD2Ev(%struct.foo* inreg %this)
+ // CHECK-LABEL: define void @_ZN3fooD1Ev(%struct.foo* inreg %this)
+ // CHECK-LABEL: define void @_ZN3fooD2Ev(%struct.foo* inreg %this)
}
void dummy() {
// older clangs accept:
// template foo::foo(int x);
foo x(10);
- // CHECK: define linkonce_odr void @_ZN3fooC1IiEET_(%struct.foo* inreg %this, i32 inreg %x)
- // CHECK: define linkonce_odr void @_ZN3fooC2IiEET_(%struct.foo* inreg %this, i32 inreg %x)
+ // CHECK-LABEL: define linkonce_odr void @_ZN3fooC1IiEET_(%struct.foo* inreg %this, i32 inreg %x)
+ // CHECK-LABEL: define linkonce_odr void @_ZN3fooC2IiEET_(%struct.foo* inreg %this, i32 inreg %x)
}
nsVorbisState::~nsVorbisState() {
}
-// CHECK: define linkonce_odr i32 @_ZN15nsOggCodecState9StartTimeEv
+// CHECK-LABEL: define linkonce_odr i32 @_ZN15nsOggCodecState9StartTimeEv
};
X<int> x;
-// CHECK: define internal void @__cxx_global_var_init()
+// CHECK-LABEL: define internal void @__cxx_global_var_init()
// CHECK: call {{.*}} @_ZN1XIiEC1Ev
// CHECK: define linkonce_odr {{.*}} @_ZN1XIiEC1Ev
// CHECK: define linkonce_odr {{.*}} @_ZN1XIiEC2Ev
template<int x> int f() { return x; }
extern "C" int g() { return f<3>(); }
#pragma GCC visibility pop
-// CHECK: define hidden i32 @g()
-// CHECK: define linkonce_odr hidden i32 @_Z1fILi3EEiv()
+// CHECK-LABEL: define hidden i32 @g()
+// CHECK-LABEL: define linkonce_odr hidden i32 @_Z1fILi3EEiv()
#pragma GCC visibility push(hidden)
template<class T> struct x5 {
};
#pragma GCC visibility pop
template<> void x5<int>::y() {}
-// CHECK: define hidden void @_ZN2x5IiE1yEv
+// CHECK-LABEL: define hidden void @_ZN2x5IiE1yEv
#pragma GCC visibility push(hidden)
namespace n __attribute((visibility("default"))) {
void f() {}
- // CHECK: define void @_ZN1n1fEv
+ // CHECK-LABEL: define void @_ZN1n1fEv
}
#pragma GCC visibility pop
namespace n __attribute((visibility("default"))) {
#pragma GCC visibility push(hidden)
void g() {}
- // CHECK: define hidden void @_ZN1n1gEv
+ // CHECK-LABEL: define hidden void @_ZN1n1gEv
#pragma GCC visibility pop
}
bar<foo>::f();
bar<int>::f();
}
- // CHECK: define linkonce_odr hidden void @_ZN5test23barINS_3fooEE1fEv
- // CHECK: define linkonce_odr void @_ZN5test23barIiE1fEv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN5test23barINS_3fooEE1fEv
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test23barIiE1fEv
}
#pragma weak foo
struct S { void foo(); };
void S::foo() {}
-// CHECK: define void @_ZN1S3fooEv(
+// CHECK-LABEL: define void @_ZN1S3fooEv(
#pragma weak zed
namespace bar { void zed() {} }
-// CHECK: define void @_ZN3bar3zedEv(
+// CHECK-LABEL: define void @_ZN3bar3zedEv(
#pragma weak bah
void bah() {}
-// CHECK: define void @_Z3bahv(
+// CHECK-LABEL: define void @_Z3bahv(
#pragma weak baz
extern "C" void baz() {}
-// CHECK: define weak void @baz(
+// CHECK-LABEL: define weak void @baz(
#pragma weak _Z3baxv
void bax() {}
// GCC produces a weak symbol for this one, but it doesn't look like a good
// idea to expose the mangling to the pragma unless we really have to.
-// CHECK: define void @_Z3baxv(
+// CHECK-LABEL: define void @_Z3baxv(
return 17;
}
-// CHECK: define i16* @_Z20lvalue_integral_castv()
+// CHECK-LABEL: define i16* @_Z20lvalue_integral_castv()
const short &lvalue_integral_cast() {
if (i == 0)
// CHECK: store i16 17, i16*
return 17;
}
-// CHECK: define i16* @_Z29lvalue_floating_integral_castv()
+// CHECK-LABEL: define i16* @_Z29lvalue_floating_integral_castv()
const short &lvalue_floating_integral_cast() {
if (i == 0)
// CHECK: store i16 17, i16*
return 17.5;
}
-// CHECK: define float* @_Z29lvalue_integral_floating_castv()
+// CHECK-LABEL: define float* @_Z29lvalue_integral_floating_castv()
const float &lvalue_integral_floating_cast() {
if (i == 0)
// CHECK: store float 1.700000e+{{0*}}1, float*
return 17;
}
-// CHECK: define float* @_Z20lvalue_floating_castv()
+// CHECK-LABEL: define float* @_Z20lvalue_floating_castv()
const float &lvalue_floating_cast() {
if (i == 0)
// CHECK: store float 1.700000e+{{0*}}1, float*
int get_int();
-// CHECK: define i8* @_Z24lvalue_integer_bool_castv()
+// CHECK-LABEL: define i8* @_Z24lvalue_integer_bool_castv()
const bool &lvalue_integer_bool_cast() {
if (i == 0)
// CHECK: call i32 @_Z7get_intv()
float get_float();
-// CHECK: define i8* @_Z25lvalue_floating_bool_castv()
+// CHECK-LABEL: define i8* @_Z25lvalue_floating_bool_castv()
const bool &lvalue_floating_bool_cast() {
if (i == 0)
// CHECK: call float @_Z9get_floatv()
pm get_pointer_to_member_data();
pmf get_pointer_to_member_function();
-// CHECK: define i8* @_Z26lvalue_ptrmem_to_bool_castv()
+// CHECK-LABEL: define i8* @_Z26lvalue_ptrmem_to_bool_castv()
const bool &lvalue_ptrmem_to_bool_cast() {
if (i == 0)
// CHECK: call i64 @_Z26get_pointer_to_member_datav()
return get_pointer_to_member_data();
}
-// CHECK: define i8* @_Z27lvalue_ptrmem_to_bool_cast2v
+// CHECK-LABEL: define i8* @_Z27lvalue_ptrmem_to_bool_cast2v
const bool &lvalue_ptrmem_to_bool_cast2() {
if (i == 0)
// CHECK: {{call.*_Z30get_pointer_to_member_functionv}}
return get_complex_double();
}
-// CHECK: define i32 @_Z7pr10592RKi(i32*
+// CHECK-LABEL: define i32 @_Z7pr10592RKi(i32*
unsigned pr10592(const int &v) {
// CHECK: [[VADDR:%[a-zA-Z0-9.]+]] = alloca i32*
// CHECK-NEXT: [[REFTMP:%[a-zA-Z0-9.]+]] = alloca i32
unsigned long long test(Helper *obj) {
return static_cast<const unsigned long long&>(obj->id());
}
- // CHECK: define i64 @_ZN7PR106504testEPNS_6HelperE
+ // CHECK-LABEL: define i64 @_ZN7PR106504testEPNS_6HelperE
// CHECK: store i64
}
// RUN: not %clang_cc1 -triple x86_64-apple-darwin -verify -emit-llvm -o - %s | FileCheck %s
void t1() {
- // CHECK: define void @_Z2t1v
+ // CHECK-LABEL: define void @_Z2t1v
// CHECK: [[REFLOAD:%.*]] = load i32** @a, align 8
// CHECK: load i32* [[REFLOAD]], align 4
extern int& a;
}
void t2(int& a) {
- // CHECK: define void @_Z2t2Ri
+ // CHECK-LABEL: define void @_Z2t2Ri
// CHECK: [[REFLOAD2:%.*]] = load i32** {{.*}}, align 8
// CHECK: load i32* [[REFLOAD2]], align 4
int b = a;
P getP();
- // CHECK: define void @_ZN2N21fEi
+ // CHECK-LABEL: define void @_ZN2N21fEi
// CHECK: call void @_ZN2N24getPEv
// CHECK: getelementptr inbounds
// CHECK: store i32 17
Z getZ();
- // CHECK: define void @_ZN2N21gEi
+ // CHECK-LABEL: define void @_ZN2N21gEi
// CHECK: call void @_ZN2N24getZEv
// CHECK: {{getelementptr inbounds.*i32 0, i32 0}}
// CHECK: {{getelementptr inbounds.*i32 0, i32 0}}
~A();
};
-// CHECK: define internal void @__cxx_global_var_init
+// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: call void @_ZN2N31AC1Ei(%"struct.N3::A"* @_ZGRN2N35sA123E, i32 123)
// CHECK: call i32 @__cxa_atexit
// CHECK: ret void
};
void f() {
- // CHECK: define void @_ZN2N41fEv
+ // CHECK-LABEL: define void @_ZN2N41fEv
// CHECK: call void @_ZN2N41AC1Ev(%"struct.N4::A"* @_ZGRZN2N41fEvE2ar)
// CHECK: call i32 @__cxa_atexit
// CHECK: ret void
// PR9565
namespace PR9565 {
struct a { int a : 10, b : 10; };
- // CHECK: define void @_ZN6PR95651fEv()
+ // CHECK-LABEL: define void @_ZN6PR95651fEv()
void f() {
// CHECK: call void @llvm.memcpy
a x = { 0, 0 };
namespace N6 {
extern struct x {char& x;}y;
int a() { return y.x; }
- // CHECK: define i32 @_ZN2N61aEv
+ // CHECK-LABEL: define i32 @_ZN2N61aEv
// CHECK: [[REFLOAD3:%.*]] = load i8** getelementptr inbounds (%"struct.N6::x"* @_ZN2N61yE, i32 0, i32 0), align 8
// CHECK: load i8* [[REFLOAD3]], align 1
}
static int (B::*d)[10];
};
-// CHECK: define i32 @_Z1fv()
+// CHECK-LABEL: define i32 @_Z1fv()
int f() {
// Vectors should be treated as fundamental types.
typedef short __v4hi __attribute__ ((__vector_size__ (8)));
};
A global;
-// CHECK: define internal arm_aapcscc void @__cxx_global_var_init()
+// CHECK-LABEL: define internal arm_aapcscc void @__cxx_global_var_init()
// CHECK: call arm_aapcscc [[A]]* @_ZN5test01AC1Ev([[A]]* @_ZN5test06globalE)
// CHECK-NEXT: call arm_aapcscc i32 @__cxa_atexit(void (i8*)* bitcast ([[A]]* ([[A]]*)* @_ZN5test01AD1Ev to void (i8*)*), i8* bitcast ([[A]]* @_ZN5test06globalE to i8*), i8* @__dso_handle) [[NOUNWIND:#[0-9]+]]
// CHECK-NEXT: ret void
throw 0;
}
-// CHECK: define arm_aapcscc void @_ZN5test14testEv()
+// CHECK-LABEL: define arm_aapcscc void @_ZN5test14testEv()
// CHECK: [[T0:%.*]] = call arm_aapcscc i8* @__cxa_allocate_exception(i32 4) [[NOUNWIND]]
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to i32*
// CHECK-NEXT: store i32 0, i32* [[T1]]
// CHECK: declare arm_aapcscc void @__cxa_throw(i8*, i8*, i8*)
-// CHECK: define internal arm_aapcscc void @_GLOBAL__I_a()
+// CHECK-LABEL: define internal arm_aapcscc void @_GLOBAL__I_a()
// CHECK: call arm_aapcscc void @__cxx_global_var_init()
B &getB();
-// CHECK: define %struct.A* @_Z4getAv()
+// CHECK-LABEL: define %struct.A* @_Z4getAv()
// CHECK: call %struct.B* @_Z4getBv()
// CHECK-NEXT: bitcast %struct.B*
// CHECK-NEXT: getelementptr inbounds i8*
int &&getIntXValue();
int getIntPRValue();
-// CHECK: define i32* @_Z2f0v()
+// CHECK-LABEL: define i32* @_Z2f0v()
// CHECK: call i32* @_Z12getIntLValuev()
// CHECK-NEXT: ret i32*
int &&f0() { return static_cast<int&&>(getIntLValue()); }
-// CHECK: define i32* @_Z2f1v()
+// CHECK-LABEL: define i32* @_Z2f1v()
// CHECK: call i32* @_Z12getIntXValuev()
// CHECK-NEXT: ret i32*
int &&f1() { return static_cast<int&&>(getIntXValue()); }
-// CHECK: define i32* @_Z2f2v
+// CHECK-LABEL: define i32* @_Z2f2v
// CHECK: call i32 @_Z13getIntPRValuev()
// CHECK-NEXT: store i32 {{.*}}, i32*
// CHECK-NEXT: ret i32*
C test();
-// CHECK: define void @_Z15elide_copy_initv
+// CHECK-LABEL: define void @_Z15elide_copy_initv
void elide_copy_init() {
ok = false;
// CHECK: call void @_Z4testv
// CHECK-NEXT: ret void
}
-// CHECK: define void @_Z16test_move_returnv
+// CHECK-LABEL: define void @_Z16test_move_returnv
C test_move_return() {
// CHECK: call void @_ZN1CC1Ei
C a1(3);
B(int i);
};
- // CHECK: define void @_ZN5test11BC2Ei(
+ // CHECK-LABEL: define void @_ZN5test11BC2Ei(
// CHECK: [[T0:%.*]] = call i32* @_ZN5test14moveERi(
// CHECK-NEXT: [[T1:%.*]] = load i32* [[T0]]
// CHECK-NEXT: call void @_ZN5test11AC1Ei({{.*}}, i32 [[T1]])
~A();
};
-// CHECK: define void @_ZN5Test11AD2Ev
+// CHECK-LABEL: define void @_ZN5Test11AD2Ev
// CHECK-NOT: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test11AE, i64 0, i64 2), i8***
A::~A()
{
~A();
};
-// CHECK: define void @_ZN5Test21AD2Ev
+// CHECK-LABEL: define void @_ZN5Test21AD2Ev
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test21AE, i64 0, i64 2), i8***
A::~A() {
f();
Field field;
};
-// CHECK: define void @_ZN5Test31AD2Ev
+// CHECK-LABEL: define void @_ZN5Test31AD2Ev
// CHECK-NOT: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test31AE, i64 0, i64 2), i8***
A::~A() {
Field field;
};
-// CHECK: define void @_ZN5Test41AD2Ev
+// CHECK-LABEL: define void @_ZN5Test41AD2Ev
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test41AE, i64 0, i64 2), i8***
A::~A()
{
Field field;
};
-// CHECK: define void @_ZN5Test51AD2Ev
+// CHECK-LABEL: define void @_ZN5Test51AD2Ev
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test51AE, i64 0, i64 2), i8***
A::~A()
{
Field field;
};
-// CHECK: define void @_ZN5Test61AD2Ev
+// CHECK-LABEL: define void @_ZN5Test61AD2Ev
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test61AE, i64 0, i64 2), i8***
A::~A()
{
Field field;
};
-// CHECK: define void @_ZN5Test71AD2Ev
+// CHECK-LABEL: define void @_ZN5Test71AD2Ev
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test71AE, i64 0, i64 2), i8***
A::~A()
{
Field field;
};
-// CHECK: define void @_ZN5Test81AD2Ev
+// CHECK-LABEL: define void @_ZN5Test81AD2Ev
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTVN5Test81AE, i64 0, i64 2), i8***
A::~A()
{
template struct A<int>;
}
- // CHECK: define internal void @__cxx_global_var_init()
+ // CHECK-LABEL: define internal void @__cxx_global_var_init()
// CHECK: [[TMP:%.*]] = call i32 @_ZN5test23fooEv()
// CHECK-NEXT: store i32 [[TMP]], i32* @_ZN5test212_GLOBAL__N_11AIiE1xE, align 4
// CHECK-NEXT: ret void
template <class T> int A<T>::x = foo();
template struct A<int>;
- // CHECK: define internal void @__cxx_global_var_init1()
+ // CHECK-LABEL: define internal void @__cxx_global_var_init1()
// CHECK: [[GUARDBYTE:%.*]] = load i8* bitcast (i64* @_ZGVN5test31AIiE1xE to i8*)
// CHECK-NEXT: [[UNINITIALIZED:%.*]] = icmp eq i8 [[GUARDBYTE]], 0
// CHECK-NEXT: br i1 [[UNINITIALIZED]]
};
int f(A *a) {
- // CHECK: define i32 @_ZN5test41fEPNS_1AE
+ // CHECK-LABEL: define i32 @_ZN5test41fEPNS_1AE
// CHECK: ret i32 76
return a->n;
}
}
namespace test1 {
- // CHECK: define internal i32 @_ZN5test1L6getvarEi(
+ // CHECK-LABEL: define internal i32 @_ZN5test1L6getvarEi(
static inline int getvar(int index) {
static const int var[] = { 1, 0, 2, 4 };
return var[index];
unsigned char base_req_uchar[] = { "bar" };
namespace union_static_local {
- // CHECK: define internal void @_ZZN18union_static_local4testEvEN1c4mainEv
+ // CHECK-LABEL: define internal void @_ZZN18union_static_local4testEvEN1c4mainEv
// CHECK: call void @_ZN18union_static_local1fEPNS_1xE(%"union.union_static_local::x"* bitcast ({ [2 x i8*] }* @_ZZN18union_static_local4testEvE3foo to %"union.union_static_local::x"*))
union x { long double y; const char *x[2]; };
void f(union x*);
B::B() {
static int x = foo();
}
- // CHECK: define void @_ZN5test21BC1Ev
+ // CHECK-LABEL: define void @_ZN5test21BC1Ev
// CHECK: load atomic i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire,
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x)
// CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv()
// CHECK: store i32 [[T0]], i32* @_ZZN5test21BC1EvE1x,
// CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BC1EvE1x)
- // CHECK: define void @_ZN5test21BC2Ev
+ // CHECK-LABEL: define void @_ZN5test21BC2Ev
// CHECK: load atomic i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire,
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x)
// CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv()
B::~B() {
static int y = foo();
}
- // CHECK: define void @_ZN5test21BD1Ev(
+ // CHECK-LABEL: define void @_ZN5test21BD1Ev(
// CHECK: call void @_ZN5test21BD2Ev(
- // CHECK: define void @_ZN5test21BD2Ev(
+ // CHECK-LABEL: define void @_ZN5test21BD2Ev(
// CHECK: load atomic i8* bitcast (i64* @_ZGVZN5test21BD1EvE1y to i8*) acquire,
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BD1EvE1y)
// CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv()
union U { char x; int i; };
static U u = { 'a' };
}
- // CHECK: define void @_ZN5test31BC1Ev(
- // CHECK: define void @_ZN5test31BC2Ev(
+ // CHECK-LABEL: define void @_ZN5test31BC1Ev(
+ // CHECK-LABEL: define void @_ZN5test31BC2Ev(
}
void test() {
// Look for two instantiations, one for FOO's
// type and one for BAR's.
- // CHECK: define linkonce_odr i32 @_Z1fIN1SUt_EEiT_(i32 %t)
+ // CHECK-LABEL: define linkonce_odr i32 @_Z1fIN1SUt_EEiT_(i32 %t)
(void)f(S::FOO);
- // CHECK: define linkonce_odr i32 @_Z1fIN1SUt0_EEiT_(i32 %t)
+ // CHECK-LABEL: define linkonce_odr i32 @_Z1fIN1SUt0_EEiT_(i32 %t)
(void)f(S::BAR);
// Now check for the class template instantiations. Annoyingly, they are in
// reverse order.
//
// BAR's instantiation of X:
- // CHECK: define linkonce_odr i32 @_ZN1XIN1SUt0_EE1fEv(%struct.X* %this)
- // CHECK: define linkonce_odr void @_ZN1XIN1SUt0_EEC2ES1_(%struct.X* %this, i32 %t) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt0_EE1fEv(%struct.X* %this)
+ // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt0_EEC2ES1_(%struct.X* %this, i32 %t) unnamed_addr
//
// FOO's instantiation of X:
- // CHECK: define linkonce_odr i32 @_ZN1XIN1SUt_EE1fEv(%struct.X.0* %this)
- // CHECK: define linkonce_odr void @_ZN1XIN1SUt_EEC2ES1_(%struct.X.0* %this, i32 %t) unnamed_addr
+ // CHECK-LABEL: define linkonce_odr i32 @_ZN1XIN1SUt_EE1fEv(%struct.X.0* %this)
+ // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt_EEC2ES1_(%struct.X.0* %this, i32 %t) unnamed_addr
}
}
int main() {
-// CHECK: define linkonce_odr void @_Z11IntToStringIcEvT_(
+// CHECK-LABEL: define linkonce_odr void @_Z11IntToStringIcEvT_(
IntToString('a');
}
// Verify that symbols are hidden.
// CHECK: @_ZN1CIiE5Inner6Inner26StaticE = weak_odr hidden global
-// CHECK: define weak_odr hidden void @_ZN1CIiE5Inner1fEv
-// CHECK: define weak_odr hidden void @_ZN1CIiE5Inner6Inner21gEv
+// CHECK-LABEL: define weak_odr hidden void @_ZN1CIiE5Inner1fEv
+// CHECK-LABEL: define weak_odr hidden void @_ZN1CIiE5Inner6Inner21gEv
template<typename T>
struct C {
// CHECK-NOT: _ZTVN5test31SIiEE
// CHECK-NOT: _ZTSN5test31SIiEE
-// CHECK: define linkonce_odr void @_ZN5test21CIiEC1Ev(%"class.test2::C"* %this) unnamed_addr
-// CHECK: define linkonce_odr void @_ZN5test21CIiE6foobarIdEEvT_(
-// CHECK: define available_externally void @_ZN5test21CIiE6zedbarEd(
-
-// CHECK: define linkonce_odr void @_ZN7PR106662g1ENS_1SILi1EEE()
-// CHECK: define linkonce_odr void @_ZN7PR106662g1ENS_1SILi2EEE()
-// CHECK: define linkonce_odr void @_ZN7PR106662g1ENS_1SILi3EEE()
-// CHECK: define linkonce_odr void @_ZN7PR106662g2ENS_1SILi1EEE()
-// CHECK: define linkonce_odr void @_ZN7PR106662g2ENS_1SILi2EEE()
-// CHECK: define linkonce_odr void @_ZN7PR106662g2ENS_1SILi3EEE()
+// CHECK-LABEL: define linkonce_odr void @_ZN5test21CIiEC1Ev(%"class.test2::C"* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN5test21CIiE6foobarIdEEvT_(
+// CHECK-LABEL: define available_externally void @_ZN5test21CIiE6zedbarEd(
+
+// CHECK-LABEL: define linkonce_odr void @_ZN7PR106662g1ENS_1SILi1EEE()
+// CHECK-LABEL: define linkonce_odr void @_ZN7PR106662g1ENS_1SILi2EEE()
+// CHECK-LABEL: define linkonce_odr void @_ZN7PR106662g1ENS_1SILi3EEE()
+// CHECK-LABEL: define linkonce_odr void @_ZN7PR106662g2ENS_1SILi1EEE()
+// CHECK-LABEL: define linkonce_odr void @_ZN7PR106662g2ENS_1SILi2EEE()
+// CHECK-LABEL: define linkonce_odr void @_ZN7PR106662g2ENS_1SILi3EEE()
// CHECK: declare void @_ZN7PR106662h1ENS_1SILi1EEE()
// CHECK: declare void @_ZN7PR106662h1ENS_1SILi2EEE()
// CHECK: declare void @_ZN7PR106662h1ENS_1SILi3EEE()
// Explicit instantiations have external linkage.
-// CHECK: define weak_odr void @_ZN1AIiE1gEv(
+// CHECK-LABEL: define weak_odr void @_ZN1AIiE1gEv(
template void A<int>::g();
-// CHECK: define weak_odr void @_ZN1AIfE1fEf(
-// CHECK: define weak_odr void @_ZN1AIfE1gEv(
+// CHECK-LABEL: define weak_odr void @_ZN1AIfE1fEf(
+// CHECK-LABEL: define weak_odr void @_ZN1AIfE1gEv(
// FIXME: This should also emit the vtable.
template struct A<float>;
-// CHECK: define weak_odr void @_Z1fIiEvT_
+// CHECK-LABEL: define weak_odr void @_Z1fIiEvT_
template <typename T> void f(T) { }
template void f<int>(int);
-// CHECK: define weak_odr void @_Z1gIiEvT_
+// CHECK-LABEL: define weak_odr void @_Z1gIiEvT_
template <typename T> inline void g(T) { }
template void g<int>(int);
extern template struct X0<char>;
extern template struct X1<char>;
-// CHECK: define linkonce_odr void @_ZN2X1IcED1Ev(%struct.X1* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN2X1IcED1Ev(%struct.X1* %this) unnamed_addr
void test_X1() {
X1<char> i1c;
}
};
void f(S, int);
- // CHECK: define void @_ZN6PR58671gEv
+ // CHECK-LABEL: define void @_ZN6PR58671gEv
void g() {
// CHECK: call void @_ZN6PR58671SC1Ev
// CHECK-NEXT: call void @_ZN6PR58671fENS_1SEi
(f)(S(), 0);
}
- // CHECK: define linkonce_odr void @_ZN6PR58672g2IiEEvT_
+ // CHECK-LABEL: define linkonce_odr void @_ZN6PR58672g2IiEEvT_
template<typename T>
void g2(T) {
// CHECK: call void @_ZN6PR58671SC1Ev
struct B { operator A(); };
- // CHECK: define weak_odr void @_ZN6PR61992f2IiEENS_1AET_
+ // CHECK-LABEL: define weak_odr void @_ZN6PR61992f2IiEENS_1AET_
template<typename T> A f2(T) {
B b;
// CHECK: call void @_ZN6PR61991BcvNS_1AEEv
int& f(int);
-// CHECK: define void @_ZN3T121gEv
+// CHECK-LABEL: define void @_ZN3T121gEv
void g() {
// CHECK: call void @_ZN3T121AC1Ev
// CHECK-NEXT: call i32 @_ZN3T121A1fEv(
struct A { ~A(); };
struct B { int i; ~B(); };
struct C { int C::*pm; ~C(); };
- // CHECK: define void @_ZN6PR75563fooEv()
+ // CHECK-LABEL: define void @_ZN6PR75563fooEv()
void foo() {
// CHECK: call void @_ZN6PR75561AD1Ev
A();
A fooA();
void takeA(A a);
- // CHECK: define void @_ZN7Elision5test0Ev()
+ // CHECK-LABEL: define void @_ZN7Elision5test0Ev()
void test0() {
// CHECK: [[I:%.*]] = alloca [[A:%.*]], align 8
// CHECK-NEXT: [[J:%.*]] = alloca [[A]], align 8
}
- // CHECK: define void @_ZN7Elision5test1EbNS_1AE(
+ // CHECK-LABEL: define void @_ZN7Elision5test1EbNS_1AE(
void test1(bool c, A x) {
// CHECK: [[I:%.*]] = alloca [[A]], align 8
// CHECK-NEXT: [[J:%.*]] = alloca [[A]], align 8
// CHECK: ret void
}
- // CHECK: define void @_ZN7Elision5test4Ev()
+ // CHECK-LABEL: define void @_ZN7Elision5test4Ev()
void test4() {
// CHECK: [[X:%.*]] = alloca [[A]], align 8
// CHECK-NEXT: [[XS:%.*]] = alloca [2 x [[A]]], align 16
namespace PR8623 {
struct A { A(int); ~A(); };
- // CHECK: define void @_ZN6PR86233fooEb(
+ // CHECK-LABEL: define void @_ZN6PR86233fooEb(
void foo(bool b) {
// CHECK: [[TMP:%.*]] = alloca [[A:%.*]], align 1
// CHECK-NEXT: [[LCONS:%.*]] = alloca i1
namespace PR11365 {
struct A { A(); ~A(); };
- // CHECK: define void @_ZN7PR113653fooEv(
+ // CHECK-LABEL: define void @_ZN7PR113653fooEv(
void foo() {
// CHECK: [[BEGIN:%.*]] = getelementptr inbounds [3 x [[A:%.*]]]* {{.*}}, i32 0, i32 0
// CHECK-NEXT: [[END:%.*]] = getelementptr inbounds [[A]]* [[BEGIN]], i64 3
struct A { ~A(); };
struct B { A operator=(const B&); };
struct C : B { B b1, b2; };
- // CHECK: define void @_ZN12AssignmentOp1fE
+ // CHECK-LABEL: define void @_ZN12AssignmentOp1fE
void f(C &c1, const C &c2) {
// CHECK: call {{.*}} @_ZN12AssignmentOp1CaSERKS0_(
c1 = c2;
struct A { A(int); ~A(); };
void g();
- // CHECK: define void @_ZN24ImplicitTemporaryCleanup1fEv(
+ // CHECK-LABEL: define void @_ZN24ImplicitTemporaryCleanup1fEv(
void f() {
// CHECK: call {{.*}} @_ZN24ImplicitTemporaryCleanup1AC1Ei(
A &&a = 0;
}
};
-// CHECK: define void @_Z4testv()
+// CHECK-LABEL: define void @_Z4testv()
void test( void ) {
// CHECK: call void @_ZN1CC1Ev(%class.C* [[C:%.+]])
C c;
struct Y { };
-// CHECK: define void @_Z1fv
+// CHECK-LABEL: define void @_Z1fv
void f() {
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZ1fvE1x)
// CHECK: invoke void @_ZN1XC1Ev
} catch (...) { }
}
-// CHECK: define void @_Z1fv
+// CHECK-LABEL: define void @_Z1fv
// CHECK: call void @_ZN5ErrorC1ERK1X
// CHECK: invoke void @__cxa_throw
// CHECK: landingpad
int test5(bool x, bool y, int z) {
return (x ? throw 1 : y) ? z : throw 2;
}
-// CHECK: define i32 @_Z5test5bbi(
+// CHECK-LABEL: define i32 @_Z5test5bbi(
// CHECK: br i1
//
// x.true:
int test6(bool x, bool y, int z) {
return (x ? throw 1 : y) ? z : (throw 2);
}
-// CHECK: define i32 @_Z5test6bbi(
+// CHECK-LABEL: define i32 @_Z5test6bbi(
// CHECK: br i1
//
// x.true:
b->f();
}
-// CHECK: define void @_ZN5Test21fEv()
+// CHECK-LABEL: define void @_ZN5Test21fEv()
// CHECK: call void @_ZN5Test21C1fEv
// CHECK: ret void
-// CHECK: define available_externally void @_ZThn16_N5Test21C1fEv
+// CHECK-LABEL: define available_externally void @_ZThn16_N5Test21C1fEv
void f() {
C c;
f(&c);
virtual void f();
};
-// CHECK: define void @_ZThn8_N5Test11C1fEv(
+// CHECK-LABEL: define void @_ZThn8_N5Test11C1fEv(
void C::f() { }
}
virtual void f();
};
-// CHECK: define void @_ZTv0_n24_N5Test21B1fEv(
+// CHECK-LABEL: define void @_ZTv0_n24_N5Test21B1fEv(
void B::f() { }
}
virtual void f();
};
-// CHECK: define protected void @_ZThn8_N5Test41C1fEv(
+// CHECK-LABEL: define protected void @_ZThn8_N5Test41C1fEv(
void C::f() { }
}
virtual X f();
};
- // CHECK: define void @_ZThn16_N5Test66Thunks1fEv
+ // CHECK-LABEL: define void @_ZThn16_N5Test66Thunks1fEv
// CHECK-NOT: memcpy
// CHECK: {{call void @_ZN5Test66Thunks1fEv.*sret}}
// CHECK: ret void
void D::baz(X, X&, _Complex float, Small, Small&, Large) { }
- // CHECK: define void @_ZThn8_N5Test71D3bazENS_1XERS1_CfNS_5SmallERS4_NS_5LargeE(
+ // CHECK-LABEL: define void @_ZThn8_N5Test71D3bazENS_1XERS1_CfNS_5SmallERS4_NS_5LargeE(
// CHECK-NOT: memcpy
// CHECK: ret void
void testD() { D d; }
// CHECK: define void @_ZN5Test81C6helperENS_6NonPODE([[NONPODTYPE:%.*]]*
void C::helper(NonPOD var) {}
- // CHECK: define void @_ZThn8_N5Test81C3barENS_6NonPODE(
+ // CHECK-LABEL: define void @_ZThn8_N5Test81C3barENS_6NonPODE(
// CHECK-NOT: load [[NONPODTYPE]]*
// CHECK-NOT: memcpy
// CHECK: ret void
struct B { virtual void foo(); };
struct C : A, B { void foo() {} };
- // CHECK-HIDDEN: define linkonce_odr void @_ZN6Test101C3fooEv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZThn8_N6Test101C3fooEv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZThn8_N6Test101C3fooEv
void test() {
C c;
/**** The following has to go at the end of the file ****/
// This is from Test5:
-// CHECK: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv
-// CHECK: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(
+// CHECK-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv
+// CHECK-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(
// CHECK: attributes [[NUW]] = { nounwind uwtable{{.*}} }
};
template struct B<A>;
- // FUNS: define weak_odr void @_ZN5temp01BINS_1AEE3fooEv(
+ // FUNS-LABEL: define weak_odr void @_ZN5temp01BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp01BINS_1AEEE = weak_odr unnamed_addr constant
// VARS: @_ZTSN5temp01BINS_1AEEE = weak_odr constant
// VARS: @_ZTIN5temp01BINS_1AEEE = weak_odr unnamed_addr constant
- // FUNS-HIDDEN: define weak_odr hidden void @_ZN5temp01BINS_1AEE3fooEv(
+ // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp01BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp01BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp01BINS_1AEEE = weak_odr hidden constant
// VARS-HIDDEN: @_ZTIN5temp01BINS_1AEEE = weak_odr hidden unnamed_addr constant
};
template struct B<A>;
- // FUNS: define weak_odr void @_ZN5temp11BINS_1AEE3fooEv(
+ // FUNS-LABEL: define weak_odr void @_ZN5temp11BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
// VARS: @_ZTSN5temp11BINS_1AEEE = weak_odr constant
// VARS: @_ZTIN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
- // FUNS-HIDDEN: define weak_odr hidden void @_ZN5temp11BINS_1AEE3fooEv(
+ // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp11BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp11BINS_1AEEE = weak_odr constant
// VARS-HIDDEN: @_ZTIN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
};
template struct B<A>;
- // FUNS: define weak_odr void @_ZN5temp21BINS_1AEE3fooEv(
+ // FUNS-LABEL: define weak_odr void @_ZN5temp21BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp21BINS_1AEEE = weak_odr unnamed_addr constant
// VARS: @_ZTSN5temp21BINS_1AEEE = weak_odr constant
// VARS: @_ZTIN5temp21BINS_1AEEE = weak_odr unnamed_addr constant
- // FUNS-HIDDEN: define weak_odr hidden void @_ZN5temp21BINS_1AEE3fooEv(
+ // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp21BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp21BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp21BINS_1AEEE = weak_odr hidden constant
// VARS-HIDDEN: @_ZTIN5temp21BINS_1AEEE = weak_odr hidden unnamed_addr constant
};
template struct B<A>;
- // FUNS: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv(
+ // FUNS-LABEL: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS: @_ZTSN5temp31BINS_1AEEE = weak_odr hidden constant
// VARS: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
- // FUNS-HIDDEN: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv(
+ // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp31BINS_1AEEE = weak_odr hidden constant
// VARS-HIDDEN: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
};
template struct B<A>;
- // FUNS: define weak_odr void @_ZN5temp41BINS_1AEE3fooEv(
+ // FUNS-LABEL: define weak_odr void @_ZN5temp41BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS: @_ZTSN5temp41BINS_1AEEE = weak_odr hidden constant
// VARS: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
- // FUNS-HIDDEN: define weak_odr hidden void @_ZN5temp41BINS_1AEE3fooEv(
+ // FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp41BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp41BINS_1AEEE = weak_odr hidden constant
// VARS-HIDDEN: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
};
void A::foo() {}
- // FUNS: define void @_ZN5type01A3fooEv(
+ // FUNS-LABEL: define void @_ZN5type01A3fooEv(
// VARS: @_ZTVN5type01AE = unnamed_addr constant
// VARS: @_ZTSN5type01AE = constant
// VARS: @_ZTIN5type01AE = unnamed_addr constant
- // FUNS-HIDDEN: define hidden void @_ZN5type01A3fooEv(
+ // FUNS-HIDDEN-LABEL: define hidden void @_ZN5type01A3fooEv(
// VARS-HIDDEN: @_ZTVN5type01AE = unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type01AE = constant
// VARS-HIDDEN: @_ZTIN5type01AE = unnamed_addr constant
};
void A::foo() {}
- // FUNS: define hidden void @_ZN5type11A3fooEv(
+ // FUNS-LABEL: define hidden void @_ZN5type11A3fooEv(
// VARS: @_ZTVN5type11AE = unnamed_addr constant
// VARS: @_ZTSN5type11AE = constant
// VARS: @_ZTIN5type11AE = unnamed_addr constant
- // FUNS-HIDDEN: define hidden void @_ZN5type11A3fooEv(
+ // FUNS-HIDDEN-LABEL: define hidden void @_ZN5type11A3fooEv(
// VARS-HIDDEN: @_ZTVN5type11AE = unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type11AE = constant
// VARS-HIDDEN: @_ZTIN5type11AE = unnamed_addr constant
};
void A::foo() {}
- // FUNS: define void @_ZN5type21A3fooEv(
+ // FUNS-LABEL: define void @_ZN5type21A3fooEv(
// VARS: @_ZTVN5type21AE = hidden unnamed_addr constant
// VARS: @_ZTSN5type21AE = hidden constant
// VARS: @_ZTIN5type21AE = hidden unnamed_addr constant
- // FUNS-HIDDEN: define hidden void @_ZN5type21A3fooEv(
+ // FUNS-HIDDEN-LABEL: define hidden void @_ZN5type21A3fooEv(
// VARS-HIDDEN: @_ZTVN5type21AE = hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type21AE = hidden constant
// VARS-HIDDEN: @_ZTIN5type21AE = hidden unnamed_addr constant
};
void A::foo() {}
- // FUNS: define void @_ZN5type31A3fooEv(
+ // FUNS-LABEL: define void @_ZN5type31A3fooEv(
// VARS: @_ZTVN5type31AE = hidden unnamed_addr constant
// VARS: @_ZTSN5type31AE = hidden constant
// VARS: @_ZTIN5type31AE = hidden unnamed_addr constant
- // FUNS-HIDDEN: define void @_ZN5type31A3fooEv(
+ // FUNS-HIDDEN-LABEL: define void @_ZN5type31A3fooEv(
// VARS-HIDDEN: @_ZTVN5type31AE = hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type31AE = hidden constant
// VARS-HIDDEN: @_ZTIN5type31AE = hidden unnamed_addr constant
// CHECK: @_ZN5Test14a_tiE = global
const std::type_info &a_ti = typeid(a);
-// CHECK: define i8* @_ZN5Test11fEv
+// CHECK-LABEL: define i8* @_ZN5Test11fEv
const char *f() {
try {
// CHECK: br i1
int S::*mem2;
};
- // CHECK: define i32 @_ZN6ptrmem4testEPNS_1SE
+ // CHECK-LABEL: define i32 @_ZN6ptrmem4testEPNS_1SE
int test(S *s) {
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
// CHECK: getelementptr
struct Test3 : public Test { };
-// CHECK: define void @_ZN6PR98011fEv
+// CHECK-LABEL: define void @_ZN6PR98011fEv
void f() {
// CHECK-NOT: call void @llvm.memset.p0i8.i64
// CHECK: call void @_ZN6PR98014TestC1Ei
namespace zeroinit {
struct S { int i; };
- // CHECK: define i32 @_ZN8zeroinit4testEv()
+ // CHECK-LABEL: define i32 @_ZN8zeroinit4testEv()
int test() {
// CHECK: call void @llvm.memset.p0i8.i64
// CHECK: ret i32 0
void f();
};
- // CHECK: define void @_ZN8zeroinit9testX0_X1Ev
+ // CHECK-LABEL: define void @_ZN8zeroinit9testX0_X1Ev
void testX0_X1() {
// CHECK: call void @llvm.memset.p0i8.i64
// CHECK-NEXT: call void @_ZN8zeroinit2X1C1Ev
};
- // CHECK: define void @_ZN8zeroinit9testX0_X3Ev
+ // CHECK-LABEL: define void @_ZN8zeroinit9testX0_X3Ev
void testX0_X3() {
// CHECK-NOT: call void @llvm.memset
// CHECK: call void @_ZN8zeroinit2X3IiEC1Ev
void test() {
A arr[10][20] = { 5 };
};
- // CHECK: define void @_ZN5test64testEv()
+ // CHECK-LABEL: define void @_ZN5test64testEv()
// CHECK: [[ARR:%.*]] = alloca [10 x [20 x [[A:%.*]]]],
// CHECK-NEXT: [[INNER:%.*]] = getelementptr inbounds [10 x [20 x [[A]]]]* [[ARR]], i64 0, i64 0
struct B : virtual A { int b; };
struct C : B { C(); };
C::C() : A(3), B() {}
- // CHECK: define void @_ZN7PR111241CC1Ev
+ // CHECK-LABEL: define void @_ZN7PR111241CC1Ev
// CHECK: call void @llvm.memset.p0i8.i64(i8* {{.*}}, i8 0, i64 12, i32 8, i1 false)
// CHECK-NEXT: call void @_ZN7PR111241BC2Ev
// Make sure C::C doesn't overwrite parts of A while it is zero-initializing B
struct B2 : virtual A { int B::*b; };
struct C2 : B2 { C2(); };
C2::C2() : A(3), B2() {}
- // CHECK: define void @_ZN7PR111242C2C1Ev
+ // CHECK-LABEL: define void @_ZN7PR111242C2C1Ev
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.*}}, i8* {{.*}}, i64 16, i32 8, i1 false)
// CHECK-NEXT: call void @_ZN7PR111242B2C2Ev
}
// Ensure we produce an i1 here, and don't assert.
-// CHECK: define void @_Z9r170806_bv(
+// CHECK-LABEL: define void @_Z9r170806_bv(
// CHECK: call void @_Z9r170806_ab(i1 zeroext false)
void r170806_a(bool b = bool());
void r170806_b() { r170806_a(); }
-// CHECK: define linkonce_odr void @_ZN8zeroinit2X3IiEC2Ev(%"struct.zeroinit::X3"* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN8zeroinit2X3IiEC2Ev(%"struct.zeroinit::X3"* %this) unnamed_addr
// CHECK: call void @llvm.memset.p0i8.i64
// CHECK-NEXT: call void @_ZN8zeroinit2X2IiEC2Ev
// CHECK-NEXT: ret void
void vararg(...);
-// CHECK: define void @_Z4test1X
+// CHECK-LABEL: define void @_Z4test1X
void test(X x) {
// CHECK: call void @llvm.trap()
vararg(x);
// though there is no way to do a va_begin. Otherwise, the optimizer
// will warn about 'dropped arguments' at the call site.
- // CHECK: define i32 @_ZN5test05test1Ez(...)
+ // CHECK-LABEL: define i32 @_ZN5test05test1Ez(...)
int test1(...) {
return -1;
}
A x;
foo(x);
}
- // CHECK: define void @_ZN5test14testEv()
+ // CHECK-LABEL: define void @_ZN5test14testEv()
// CHECK: [[X:%.*]] = alloca [[A:%.*]], align 4
// CHECK-NEXT: [[TMP:%.*]] = alloca [[A]], align 4
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[TMP]] to i8*
return sizeof...(Types);
}
-// CHECK: define weak_odr i32 @_Z13get_num_typesIJifdEEiDpT_
+// CHECK-LABEL: define weak_odr i32 @_Z13get_num_typesIJifdEEiDpT_
// CHECK: ret i32 3
template int get_num_types(int, float, double);
namespace test1 {
template <class... T> void foo() {
int values[sizeof...(T)+1] = { T::value... };
- // CHECK: define linkonce_odr void @_ZN5test13fooIJEEEvv()
+ // CHECK-LABEL: define linkonce_odr void @_ZN5test13fooIJEEEvv()
// CHECK: alloca [1 x i32], align 4
}
};
Foo::~Foo() {}
-// CHECK: define void @_ZN3FooD0Ev(%class.Foo* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN3FooD0Ev(%class.Foo* %this) unnamed_addr
};
// CHECK: @_ZN1AC1Ev = alias {{.*}} @_ZN1AC2Ev
-// CHECK: define void @_ZN1AC2Ev(%struct.A* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC2Ev(%struct.A* %this) unnamed_addr
A::A() { }
struct B : virtual A {
B();
};
-// CHECK: define void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
-// CHECK: define void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt) unnamed_addr
B::B() { }
struct C : virtual A {
C(bool);
};
-// CHECK: define void @_ZN1CC1Eb(%struct.C* %this, i1 zeroext) unnamed_addr
-// CHECK: define void @_ZN1CC2Eb(%struct.C* %this, i8** %vtt, i1 zeroext) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CC1Eb(%struct.C* %this, i1 zeroext) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CC2Eb(%struct.C* %this, i8** %vtt, i1 zeroext) unnamed_addr
C::C(bool) { }
// PR6251
D();
};
-// CHECK: define void @_ZN6PR62511DC1Ev(%"struct.PR6251::D"* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN6PR62511DC1Ev(%"struct.PR6251::D"* %this) unnamed_addr
// CHECK: call void @_ZN6PR62511AIcEC2Ev
// CHECK-NOT: call void @_ZN6PR62511AIcEC2Ev
// CHECK: ret void
// CHECK: @_ZN1CD2Ev = alias bitcast {{.*}} @_ZN1BD2Ev
// Deleting dtor: defers to the complete dtor.
-// CHECK: define void @_ZN1BD0Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BD0Ev(%struct.B* %this) unnamed_addr
// CHECK: call void @_ZN1BD1Ev
// CHECK: call void @_ZdlPv
// Base dtor: actually calls A's base dtor.
-// CHECK: define void @_ZN1BD2Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BD2Ev(%struct.B* %this) unnamed_addr
// CHECK: call void @_ZN6MemberD1Ev
// CHECK: call void @_ZN1AD2Ev
// Complete dtor: just an alias (checked above).
// Deleting dtor: defers to the complete dtor.
-// CHECK: define void @_ZN1CD0Ev(%struct.C* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CD0Ev(%struct.C* %this) unnamed_addr
// CHECK: call void @_ZN1CD1Ev
// CHECK: call void @_ZdlPv
void B::f() { }
-// CHECK: define i32 @_ZN1D1gEv(%struct.D* %this)
+// CHECK-LABEL: define i32 @_ZN1D1gEv(%struct.D* %this)
// CHECK: declare void @_ZN1B1gEv()
struct C;
// <rdar://problem/8109763>
void test_X(X<int> xi, X<char> xc) {
- // CHECK: define weak_odr hidden void @_ZN1XIiE1fEv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN1XIiE1fEv
xi.f();
- // CHECK: define weak_odr hidden void @_ZN1XIiE1gEv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN1XIiE1gEv
xi.g();
// CHECK: declare void @_ZN1XIcE1fEv
xc.f();
- // CHECK: define available_externally void @_ZN1XIcE1gEv
+ // CHECK-LABEL: define available_externally void @_ZN1XIcE1gEv
xc.g();
}
extern template struct X1<float>;
void use(X0 *x0, X1<int> *x1, X2 *x2, X1<float> *x3) {
- // CHECK: define linkonce_odr void @_ZN2X02f1Ev
+ // CHECK-LABEL: define linkonce_odr void @_ZN2X02f1Ev
x0->f1();
- // CHECK: define linkonce_odr hidden void @_ZN2X02f2Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X02f2Ev
x0->f2();
- // CHECK: define linkonce_odr hidden void @_ZN2X02f3Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X02f3Ev
x0->f3();
- // CHECK: define linkonce_odr hidden void @_ZN2X02f5Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X02f5Ev
X0::f5();
- // CHECK: define linkonce_odr hidden void @_ZN2X02f6Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X02f6Ev
x0->X0::f6();
- // CHECK: define linkonce_odr void @_ZN2X1IiE2f1Ev
+ // CHECK-LABEL: define linkonce_odr void @_ZN2X1IiE2f1Ev
x1->f1();
- // CHECK: define linkonce_odr hidden void @_ZN2X1IiE2f2Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X1IiE2f2Ev
x1->f2();
- // CHECK: define linkonce_odr hidden void @_ZN2X1IiE2f3Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X1IiE2f3Ev
x1->f3();
- // CHECK: define linkonce_odr hidden void @_ZN2X1IiE2f4Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X1IiE2f4Ev
x1->f4();
- // CHECK: define linkonce_odr hidden void @_ZN2X1IiE2f5Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X1IiE2f5Ev
X1<int>::f5();
- // CHECK: define linkonce_odr hidden void @_ZN2X1IiE2f6Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X1IiE2f6Ev
x1->X1::f6();
- // CHECK: define linkonce_odr hidden void @_ZN2X22f2Ev
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN2X22f2Ev
x2->f2();
- // CHECK: define available_externally void @_ZN2X1IfE2f2Ev
+ // CHECK-LABEL: define available_externally void @_ZN2X1IfE2f2Ev
x3->f2();
}
ns::foo<arg>();
}
- // CHECK: define available_externally void @_ZN5test22ns3fooINS_1BINS_1AEEEEEvv()
+ // CHECK-LABEL: define available_externally void @_ZN5test22ns3fooINS_1BINS_1AEEEEEvv()
}
namespace PR11642 {
};
extern template class Foo<int>;
template class Foo<int>;
- // CHECK: define weak_odr i32 @_ZN7PR116423FooIiE3fooEi
+ // CHECK-LABEL: define weak_odr i32 @_ZN7PR116423FooIiE3fooEi
}
// Test that clang implements the new gcc behaviour for inline functions.
foo();
zed<int>();
}
- // CHECK: define weak_odr void @_ZN5test33zedIfEEvv
- // CHECK: define linkonce_odr hidden void @_ZN5test33fooEv
- // CHECK: define linkonce_odr hidden void @_ZN5test33zedIiEEvv
+ // CHECK-LABEL: define weak_odr void @_ZN5test33zedIfEEvv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN5test33fooEv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN5test33zedIiEEvv
}
namespace test4 {
void bar() {
foo();
}
- // CHECK: define available_externally void @_ZN5test43fooE
+ // CHECK-LABEL: define available_externally void @_ZN5test43fooE
}
namespace test5 {
};
void A::foo() { bar(); }
- // CHECK: define hidden void @_ZN5test01A3fooEv()
+ // CHECK-LABEL: define hidden void @_ZN5test01A3fooEv()
// CHECK: declare void @_ZN5test01A3barEv()
const std::type_info &ti = typeid(A);
};
void A::foo() { bar(); }
- // CHECK: define hidden void @_ZN5test11A3fooEv()
+ // CHECK-LABEL: define hidden void @_ZN5test11A3fooEv()
// CHECK: declare hidden void @_ZN5test11A3barEv()
const std::type_info &ti = typeid(A);
};
void A::foo() { bar(); }
- // CHECK: define void @_ZN5test21A3fooEv()
+ // CHECK-LABEL: define void @_ZN5test21A3fooEv()
// CHECK: declare void @_ZN5test21A3barEv()
const std::type_info &ti = typeid(A);
};
template void B<A>::foo();
- // CHECK: define weak_odr hidden void @_ZN5test31BINS_1AEE3fooEv()
+ // CHECK-LABEL: define weak_odr hidden void @_ZN5test31BINS_1AEE3fooEv()
// CHECK: declare void @_ZN5test31BINS_1AEE3barEv()
const std::type_info &ti = typeid(B<A>);
};
template void B<A>::foo();
- // CHECK: define weak_odr void @_ZN5test41BINS_1AEE3fooEv()
+ // CHECK-LABEL: define weak_odr void @_ZN5test41BINS_1AEE3fooEv()
// CHECK: declare void @_ZN5test41BINS_1AEE3barEv()
const std::type_info &ti = typeid(B<A>);
};
template void B<A>::foo();
- // CHECK: define weak_odr hidden void @_ZN5test51BINS_1AEE3fooEv()
+ // CHECK-LABEL: define weak_odr hidden void @_ZN5test51BINS_1AEE3fooEv()
// CHECK: declare hidden void @_ZN5test51BINS_1AEE3barEv()
const std::type_info &ti = typeid(B<A>);
// CHECK: @_ZTVN5Test63fooE = linkonce_odr hidden unnamed_addr constant
namespace Test1 {
- // CHECK: define hidden void @_ZN5Test11fEv
+ // CHECK-LABEL: define hidden void @_ZN5Test11fEv
void HIDDEN f() { }
}
};
// A::f is a member function of a hidden class.
- // CHECK: define hidden void @_ZN5Test21A1fEv
+ // CHECK-LABEL: define hidden void @_ZN5Test21A1fEv
void A::f() { }
}
};
// B is a nested class where its parent class is hidden.
- // CHECK: define hidden void @_ZN5Test31A1B1fEv
+ // CHECK-LABEL: define hidden void @_ZN5Test31A1B1fEv
void A::B::f() { }
}
int VariableInHiddenNamespace = 10;
// Test4::g is in a hidden namespace.
- // CHECK: define hidden void @_ZN5Test41gEv
+ // CHECK-LABEL: define hidden void @_ZN5Test41gEv
void g() { }
struct DEFAULT A {
};
// A has default visibility.
- // CHECK: define void @_ZN5Test41A1fEv
+ // CHECK-LABEL: define void @_ZN5Test41A1fEv
void A::f() { }
}
namespace NS HIDDEN {
// f is in NS which is hidden.
- // CHECK: define hidden void @_ZN5Test52NS1fEv()
+ // CHECK-LABEL: define hidden void @_ZN5Test52NS1fEv()
void f() { }
}
namespace NS {
// g is in NS, but this NS decl is not hidden.
- // CHECK: define void @_ZN5Test52NS1gEv
+ // CHECK-LABEL: define void @_ZN5Test52NS1gEv
void g() { }
}
}
class B : public A {};
B b; // top of file
- // CHECK: define linkonce_odr hidden void @_ZN5Test74ArefILZNS_1aEEE3fooEv()
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN5Test74ArefILZNS_1aEEE3fooEv()
void test() {
Aref<a>::foo();
}
namespace Test8 {
void foo();
void bar() {}
- // CHECK-HIDDEN: define hidden void @_ZN5Test83barEv()
+ // CHECK-HIDDEN-LABEL: define hidden void @_ZN5Test83barEv()
// CHECK-HIDDEN: declare void @_ZN5Test83fooEv()
void test() {
void DEFAULT test9_fun(struct A *a) { }
struct A DEFAULT test9_var; // above
}
- // CHECK: define void @test9_fun(
- // CHECK-HIDDEN: define void @test9_fun(
+ // CHECK-LABEL: define void @test9_fun(
+ // CHECK-HIDDEN-LABEL: define void @test9_fun(
void test() {
A a = test9_var;
void foo(A*);
};
- // CHECK: define void @_ZN6Test101B3fooEPNS_1AE(
- // CHECK-HIDDEN: define void @_ZN6Test101B3fooEPNS_1AE(
+ // CHECK-LABEL: define void @_ZN6Test101B3fooEPNS_1AE(
+ // CHECK-HIDDEN-LABEL: define void @_ZN6Test101B3fooEPNS_1AE(
void B::foo(A*) {}
}
a.bar();
}
- // CHECK: define linkonce_odr void @_ZN6Test111A3fooEv(
- // CHECK: define linkonce_odr void @_ZN6Test111A3barEv(
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6Test111A3fooEv(
- // CHECK-HIDDEN: define linkonce_odr void @_ZN6Test111A3barEv(
+ // CHECK-LABEL: define linkonce_odr void @_ZN6Test111A3fooEv(
+ // CHECK-LABEL: define linkonce_odr void @_ZN6Test111A3barEv(
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6Test111A3fooEv(
+ // CHECK-HIDDEN-LABEL: define linkonce_odr void @_ZN6Test111A3barEv(
}
// Tested at top of file.
static void test1();
};
- // CHECK: define hidden void @_ZN6Test201AILj0EE5test0Ev()
+ // CHECK-LABEL: define hidden void @_ZN6Test201AILj0EE5test0Ev()
void A<0>::test0() {}
// CHECK: declare hidden void @_ZN6Test201AILj0EE5test1Ev()
static void test3();
};
- // CHECK: define void @_ZN6Test201AILj1EE5test2Ev()
+ // CHECK-LABEL: define void @_ZN6Test201AILj1EE5test2Ev()
void A<1>::test2() {}
// CHECK: declare void @_ZN6Test201AILj1EE5test3Ev()
static void test5();
};
- // CHECK: define linkonce_odr hidden void @_ZN6Test201BINS_1AILj2EEEE5test4Ev()
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6Test201BINS_1AILj2EEEE5test4Ev()
void test4() {
B<A<2> >::test4();
}
DEFAULT void foo() {}
};
- // CHECK: define weak_odr void @_ZN6test211AILNS_2EnE0EE3fooEv(
+ // CHECK-LABEL: define weak_odr void @_ZN6test211AILNS_2EnE0EE3fooEv(
template void A<en>::foo();
}
B<A2>::bar();
}
// CHECK: declare void @_ZN6test221BINS_2A1EE3fooEv()
- // CHECK: define linkonce_odr void @_ZN6test221BINS_2A1EE3barEv()
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test221BINS_2A1EE3barEv()
// CHECK: declare void @_ZN6test221BINS_2A2EE3fooEv()
- // CHECK: define linkonce_odr void @_ZN6test221BINS_2A2EE3barEv()
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test221BINS_2A2EE3barEv()
// CHECK-HIDDEN: declare void @_ZN6test221BINS_2A1EE3fooEv()
- // CHECK-HIDDEN: define linkonce_odr void @_ZN6test221BINS_2A1EE3barEv()
+ // CHECK-HIDDEN-LABEL: define linkonce_odr void @_ZN6test221BINS_2A1EE3barEv()
// CHECK-HIDDEN: declare void @_ZN6test221BINS_2A2EE3fooEv()
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test221BINS_2A2EE3barEv()
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test221BINS_2A2EE3barEv()
}
namespace PR10113 {
};
}
template class foo::bar<char>;
- // CHECK: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
- // CHECK-HIDDEN: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
+ // CHECK-LABEL: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN7PR101133foo3barIcE3zedEv
struct zed {
};
template class foo::bar<zed>;
- // CHECK: define weak_odr void @_ZN7PR101133foo3barINS_3zedEE3zedEv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN7PR101133foo3barINS_3zedEE3zedEv
+ // CHECK-LABEL: define weak_odr void @_ZN7PR101133foo3barINS_3zedEE3zedEv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN7PR101133foo3barINS_3zedEE3zedEv
}
namespace PR11690 {
}
};
template class DEFAULT Class<char>;
- // CHECK: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
- // CHECK-HIDDEN: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
+ // CHECK-LABEL: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZNK7PR116905ClassIcE4sizeEv
template<class T> void Method() {}
template DEFAULT void Method<char>();
- // CHECK: define weak_odr void @_ZN7PR116906MethodIcEEvv
- // CHECK-HIDDEN: define weak_odr void @_ZN7PR116906MethodIcEEvv
+ // CHECK-LABEL: define weak_odr void @_ZN7PR116906MethodIcEEvv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN7PR116906MethodIcEEvv
}
namespace PR11690_2 {
struct baz {
};
template class foo::zed<baz>;
- // CHECK: define weak_odr void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv
+ // CHECK-LABEL: define weak_odr void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN9PR11690_23foo3zedINS_3bazENS0_3barEE3barEv
}
namespace test23 {
X<A> y;
y.f();
}
- // CHECK: define linkonce_odr void @_ZN6test231XINS_1AEE1fEv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test231XINS_1AEE1fEv
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test231XINS_1AEE1fEv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test231XINS_1AEE1fEv
}
namespace PR12001 {
void f() {
Bind(Version());
}
- // CHECK: define linkonce_odr void @_ZN7PR120014BindINS_7VersionEEEvRKT_
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN7PR120014BindINS_7VersionEEEvRKT_
+ // CHECK-LABEL: define linkonce_odr void @_ZN7PR120014BindINS_7VersionEEEvRKT_
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN7PR120014BindINS_7VersionEEEvRKT_
}
namespace test24 {
S s;
s.mem<A>();
}
- // CHECK: define linkonce_odr void @_ZN6test241S3memINS_1AEEEvv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test241S3memINS_1AEEEvv
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test241S3memINS_1AEEEvv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test241S3memINS_1AEEEvv
}
namespace test26 {
template<>
void C<int>::f() { }
- // CHECK: define void @_ZN6test261CIiE1fEv
- // CHECK-HIDDEN: define void @_ZN6test261CIiE1fEv
+ // CHECK-LABEL: define void @_ZN6test261CIiE1fEv
+ // CHECK-HIDDEN-LABEL: define void @_ZN6test261CIiE1fEv
}
namespace test31 {
};
void A::B::baz() {
}
- // CHECK: define void @_ZN6test321A1B3bazEv
- // CHECK-HIDDEN: define void @_ZN6test321A1B3bazEv
+ // CHECK-LABEL: define void @_ZN6test321A1B3bazEv
+ // CHECK-HIDDEN-LABEL: define void @_ZN6test321A1B3bazEv
}
namespace test33 {
struct HIDDEN zed {
};
template class DEFAULT foo<zed>;
- // CHECK: define weak_odr void @_ZN6test333fooINS_3zedEE3barEv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test333fooINS_3zedEE3barEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test333fooINS_3zedEE3barEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test333fooINS_3zedEE3barEv
}
namespace test34 {
template<class T>
void bar() {}
template DEFAULT void bar<foo>();
- // CHECK: define weak_odr void @_ZN6test343barINS_3fooEEEvv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test343barINS_3fooEEEvv
+ // CHECK-LABEL: define weak_odr void @_ZN6test343barINS_3fooEEEvv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test343barINS_3fooEEEvv
}
namespace test35 {
template class foo<zed>;
class DEFAULT zed {
};
- // CHECK: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test353fooINS_3zedEE3barEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test353fooINS_3zedEE3barEv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test353fooINS_3zedEE3barEv
}
namespace test36 {
class DEFAULT S1 {};
struct HIDDEN S2 {};
template class foo<S1, S2>;
- // CHECK: define weak_odr hidden void @_ZN6test363fooINS_2S1ENS_2S2EE3barEv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test363fooINS_2S1ENS_2S2EE3barEv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test363fooINS_2S1ENS_2S2EE3barEv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test363fooINS_2S1ENS_2S2EE3barEv
}
namespace test37 {
template<class T>
DEFAULT void bar() {}
template DEFAULT void bar<foo>();
- // CHECK: define weak_odr void @_ZN6test373barINS_3fooEEEvv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test373barINS_3fooEEEvv
+ // CHECK-LABEL: define weak_odr void @_ZN6test373barINS_3fooEEEvv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test373barINS_3fooEEEvv
}
namespace test38 {
struct HIDDEN zed {
};
template class foo<zed>;
- // CHECK: define weak_odr hidden void @_ZN6test383fooINS_3zedEE3barEv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test383fooINS_3zedEE3barEv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test383fooINS_3zedEE3barEv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test383fooINS_3zedEE3barEv
}
namespace test39 {
template void A<hidden_t>::B<hidden_t>::temp<default_t>();
template void A<hidden_t>::B<hidden_t>::temp<hidden_t>();
- // CHECK: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E6hiddenEv
- // CHECK: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E6noattrEv
- // CHECK: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempINS_9default_tEEEvv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E6hiddenEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E6noattrEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempINS_9default_tEEEvv
// GCC produces a default for this one. Why?
- // CHECK: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempIS1_EEvv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempIS1_EEvv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E6hiddenEv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E6noattrEv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempINS_9default_tEEEvv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E6hiddenEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E6noattrEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempINS_9default_tEEEvv
// GCC produces a default for this one. Why?
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempIS1_EEvv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test391AINS_8hidden_tEE1BIS1_E4tempIS1_EEvv
}
namespace test42 {
};
void bar<foo>::zed() {
}
- // CHECK: define void @_ZN6test423barINS_3fooEE3zedEv
- // CHECK-HIDDEN: define void @_ZN6test423barINS_3fooEE3zedEv
+ // CHECK-LABEL: define void @_ZN6test423barINS_3fooEE3zedEv
+ // CHECK-HIDDEN-LABEL: define void @_ZN6test423barINS_3fooEE3zedEv
}
namespace test43 {
template <>
DEFAULT void bar<foo>() {
}
- // CHECK: define void @_ZN6test433barINS_3fooEEEvv
- // CHECK-HIDDEN: define void @_ZN6test433barINS_3fooEEEvv
+ // CHECK-LABEL: define void @_ZN6test433barINS_3fooEEEvv
+ // CHECK-HIDDEN-LABEL: define void @_ZN6test433barINS_3fooEEEvv
}
namespace test44 {
}
template struct DEFAULT foo<bar>;
foo<bar> x;
- // CHECK: define internal void @_ZN6test443fooINS_12_GLOBAL__N_13barEEC1Ev
- // CHECK-HIDDEN: define internal void @_ZN6test443fooINS_12_GLOBAL__N_13barEEC1Ev
+ // CHECK-LABEL: define internal void @_ZN6test443fooINS_12_GLOBAL__N_13barEEC1Ev
+ // CHECK-HIDDEN-LABEL: define internal void @_ZN6test443fooINS_12_GLOBAL__N_13barEEC1Ev
}
namespace test45 {
}
template struct DEFAULT foo<int>::bar<zed>;
foo<int>::bar<zed> x;
- // CHECK: define internal void @_ZN6test453fooIiE3barINS_12_GLOBAL__N_13zedEEC1Ev
- // CHECK-HIDDEN: define internal void @_ZN6test453fooIiE3barINS_12_GLOBAL__N_13zedEEC1Ev
+ // CHECK-LABEL: define internal void @_ZN6test453fooIiE3barINS_12_GLOBAL__N_13zedEEC1Ev
+ // CHECK-HIDDEN-LABEL: define internal void @_ZN6test453fooIiE3barINS_12_GLOBAL__N_13zedEEC1Ev
}
namespace test46 {
void zed() {
foo<bar>();
}
- // CHECK: define internal void @_ZN6test463fooINS_12_GLOBAL__N_13barEEEvv
- // CHECK-HIDDEN: define internal void @_ZN6test463fooINS_12_GLOBAL__N_13barEEEvv
+ // CHECK-LABEL: define internal void @_ZN6test463fooINS_12_GLOBAL__N_13barEEEvv
+ // CHECK-HIDDEN-LABEL: define internal void @_ZN6test463fooINS_12_GLOBAL__N_13barEEEvv
}
namespace test47 {
void baz() {
foo::bar<zed>();
}
- // CHECK: define internal void @_ZN6test473foo3barINS_12_GLOBAL__N_13zedEEEvv
- // CHECK-HIDDEN: define internal void @_ZN6test473foo3barINS_12_GLOBAL__N_13zedEEEvv
+ // CHECK-LABEL: define internal void @_ZN6test473foo3barINS_12_GLOBAL__N_13zedEEEvv
+ // CHECK-HIDDEN-LABEL: define internal void @_ZN6test473foo3barINS_12_GLOBAL__N_13zedEEEvv
}
namespace test49 {
};
template void bar::zed<&x>();
- // CHECK: define weak_odr hidden void @_ZN6test493bar3zedIXadL_ZNS_1xEEEEEvv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test493bar3zedIXadL_ZNS_1xEEEEEvv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test493bar3zedIXadL_ZNS_1xEEEEEvv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test493bar3zedIXadL_ZNS_1xEEEEEvv
}
namespace test50 {
}
};
template void bar<&x>::zed();
- // CHECK: define weak_odr hidden void @_ZN6test503barIXadL_ZNS_1xEEEE3zedEv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test503barIXadL_ZNS_1xEEEE3zedEv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test503barIXadL_ZNS_1xEEEE3zedEv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test503barIXadL_ZNS_1xEEEE3zedEv
}
namespace test51 {
void DEFAULT zed() {
}
template void zed<&x>();
- // CHECK: define weak_odr hidden void @_ZN6test513zedIXadL_ZNS_1xEEEEEvv
- // CHECK-HIDDEN: define weak_odr hidden void @_ZN6test513zedIXadL_ZNS_1xEEEEEvv
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test513zedIXadL_ZNS_1xEEEEEvv
+ // CHECK-HIDDEN-LABEL: define weak_odr hidden void @_ZN6test513zedIXadL_ZNS_1xEEEEEvv
}
namespace test52 {
void f() {
zed<nullptr>();
}
- // CHECK: define internal void @_ZN6test523zedILPNS_12_GLOBAL__N_13fooE0EEEvv
- // CHECK-HIDDEN: define internal void @_ZN6test523zedILPNS_12_GLOBAL__N_13fooE0EEEvv
+ // CHECK-LABEL: define internal void @_ZN6test523zedILPNS_12_GLOBAL__N_13fooE0EEEvv
+ // CHECK-HIDDEN-LABEL: define internal void @_ZN6test523zedILPNS_12_GLOBAL__N_13fooE0EEEvv
}
namespace test53 {
bar<foo>::zed();
}
#pragma GCC visibility pop
- // CHECK: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test583barINS_3fooEE3zedEv
}
namespace test59 {
void test() {}
void use() {
test<&g, &f>();
- // CHECK: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1gEvEEXadL_ZNS_1fEvEEEEvv
test<&f, &g>();
- // CHECK: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test594testIXadL_ZNS_1fEvEEXadL_ZNS_1gEvEEEEvv
}
}
void test() {}
void use() {
test<a, b>();
- // CHECK: define linkonce_odr hidden void @_ZN6test604testINS_1aENS_1bEEEvv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test604testINS_1aENS_1bEEEvv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test604testINS_1aENS_1bEEEvv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test604testINS_1aENS_1bEEEvv
test<b, a>();
- // CHECK: define linkonce_odr hidden void @_ZN6test604testINS_1bENS_1aEEEvv
- // CHECK-HIDDEN: define linkonce_odr hidden void @_ZN6test604testINS_1bENS_1aEEEvv
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test604testINS_1bENS_1aEEEvv
+ // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZN6test604testINS_1bENS_1aEEEvv
}
}
A::foo<E0>();
A::B<E0>::foo();
}
- // CHECK: define linkonce_odr hidden void @_ZN6test631A3fooILNS_1EE0EEEvv()
- // CHECK: define linkonce_odr hidden void @_ZN6test631A1BILNS_1EE0EE3fooEv()
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test631A3fooILNS_1EE0EEEvv()
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test631A1BILNS_1EE0EE3fooEv()
}
// Don't ignore the visibility of template arguments just because we
};
template class B<A>;
- // CHECK: define weak_odr hidden void @_ZN6test641BINS_1AEE3fooEv()
+ // CHECK-LABEL: define weak_odr hidden void @_ZN6test641BINS_1AEE3fooEv()
}
namespace test65 {
static void foo() {}
};
- // CHECK: define void @_ZN6test651BINS_1AEE4funcEv()
+ // CHECK-LABEL: define void @_ZN6test651BINS_1AEE4funcEv()
template <> DEFAULT void B<A>::func() {}
- // CHECK: define void @_ZN6test651BINS_1AEE6funcT2IS1_EEvv()
+ // CHECK-LABEL: define void @_ZN6test651BINS_1AEE6funcT2IS1_EEvv()
template <> template <> DEFAULT void B<A>::funcT2<A>() {}
- // CHECK: define linkonce_odr void @_ZN6test651BINS_1AEE6funcT1IiEEvv()
- // CHECK: define linkonce_odr hidden void @_ZN6test651BINS_1AEE6funcT1IS1_EEvv()
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test651BINS_1AEE6funcT1IiEEvv()
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test651BINS_1AEE6funcT1IS1_EEvv()
template <> template <class T> DEFAULT void B<A>::funcT1() {}
- // CHECK: define linkonce_odr void @_ZN6test651BINS_1AEE5Inner3fooEv()
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test651BINS_1AEE5Inner3fooEv()
template <> struct DEFAULT B<A>::Inner {
static void foo() {}
};
- // CHECK: define linkonce_odr void @_ZN6test651BINS_1AEE6InnerTIiE3fooEv()
- // CHECK: define linkonce_odr hidden void @_ZN6test651BINS_1AEE6InnerTIS1_E3fooEv()
+ // CHECK-LABEL: define linkonce_odr void @_ZN6test651BINS_1AEE6InnerTIiE3fooEv()
+ // CHECK-LABEL: define linkonce_odr hidden void @_ZN6test651BINS_1AEE6InnerTIS1_E3fooEv()
template <> template <class U> struct DEFAULT B<A>::InnerT {
static void foo() {}
};
class foo;
class DEFAULT foo;
template struct barT<foo>;
- // CHECK: define weak_odr void @_ZN6test664barTINS_3fooEE3zedEv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test664barTINS_3fooEE3zedEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test664barTINS_3fooEE3zedEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test664barTINS_3fooEE3zedEv
template <int* I>
struct DEFAULT barI {
extern int I;
extern int I DEFAULT;
template struct barI<&I>;
- // CHECK: define weak_odr void @_ZN6test664barIIXadL_ZNS_1IEEEE3zedEv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test664barIIXadL_ZNS_1IEEEE3zedEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test664barIIXadL_ZNS_1IEEEE3zedEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test664barIIXadL_ZNS_1IEEEE3zedEv
typedef void (*fType)(void);
template<fType F>
void F();
void F() DEFAULT;
template struct barF<F>;
- // CHECK: define weak_odr void @_ZN6test664barFIXadL_ZNS_1FEvEEE3zedEv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test664barFIXadL_ZNS_1FEvEEE3zedEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test664barFIXadL_ZNS_1FEvEEE3zedEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test664barFIXadL_ZNS_1FEvEEE3zedEv
}
namespace test67 {
class DEFAULT foo;
template struct bar<foo>;
- // CHECK: define weak_odr void @_ZN6test673barINS_3fooEE3zedEv
- // CHECK-HIDDEN: define weak_odr void @_ZN6test673barINS_3fooEE3zedEv
+ // CHECK-LABEL: define weak_odr void @_ZN6test673barINS_3fooEE3zedEv
+ // CHECK-HIDDEN-LABEL: define weak_odr void @_ZN6test673barINS_3fooEE3zedEv
}
namespace test68 {
// rdar://problem/9506377
void test0(void *array, int n) {
- // CHECK: define void @_Z5test0Pvi(
+ // CHECK-LABEL: define void @_Z5test0Pvi(
// CHECK: [[ARRAY:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[N:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[REF:%.*]] = alloca i16*, align 8
volatile A *array;
- // CHECK: define void @_ZN5test04testENS_1AE(
+ // CHECK-LABEL: define void @_ZN5test04testENS_1AE(
void test(A t) {
// CHECK: [[ARR:%.*]] = load [[A:%.*]]** @_ZN5test05arrayE, align 8
// CHECK-NEXT: [[IDX:%.*]] = getelementptr inbounds [[A]]* [[ARR]], i64 0
namespace test1 {
volatile int *x;
- // CHECK: define void @_ZN5test14testEv()
+ // CHECK-LABEL: define void @_ZN5test14testEv()
void test() {
// CHECK: [[TMP:%.*]] = load i32** @_ZN5test11xE, align 8
// CHECK-NEXT: ret void
a->f();
};
-// CHECK: define void @_ZN5Test11gEv
+// CHECK-LABEL: define void @_ZN5Test11gEv
// CHECK: call void @_ZN5Test11A1fEv
void g() {
A a;
}
// PR9130, test that we emit a definition of A::f.
-// CHECK-TEST5: define linkonce_odr void @_ZN5Test51A1fEv
+// CHECK-TEST5-LABEL: define linkonce_odr void @_ZN5Test51A1fEv
namespace Test5 {
struct A {
void f6 ();
};
-// CHECK-TEST7: define void @_ZN5Test79check_c28Ev
+// CHECK-TEST7-LABEL: define void @_ZN5Test79check_c28Ev
// CHECK-TEST7: call void @_ZN5Test73c282f6Ev
// CHECK-TEST7: ret void
void check_c28 () {
Field field;
};
-// CHECK: define void @_ZN1AC2Ev(%struct.A* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC2Ev(%struct.A* %this) unnamed_addr
// CHECK: call void @_ZN4BaseC2Ev(
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
// CHECK: call void @_ZN5FieldC1Ev(
// CHECK: ret void
A::A() { }
-// CHECK: define void @_ZN1AD2Ev(%struct.A* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AD2Ev(%struct.A* %this) unnamed_addr
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
// CHECK: call void @_ZN5FieldD1Ev(
// CHECK: call void @_ZN4BaseD2Ev(
void f() { B b; }
-// CHECK: define linkonce_odr void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
// CHECK: call void @_ZN1BC2Ev(
-// CHECK: define linkonce_odr void @_ZN1BD1Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BD1Ev(%struct.B* %this) unnamed_addr
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1B, i64 0, i64 2)
// CHECK: call void @_ZN5FieldD1Ev(
// CHECK: call void @_ZN4BaseD2Ev(
// CHECK: ret void
-// CHECK: define linkonce_odr void @_ZN1BC2Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ev(%struct.B* %this) unnamed_addr
// CHECK: call void @_ZN4BaseC2Ev(
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1B, i64 0, i64 2)
// CHECK: call void @_ZN5FieldC1Ev
short s;
};
-// CHECK: define void @_Z1fv(%struct.S* noalias sret %
+// CHECK-LABEL: define void @_Z1fv(%struct.S* noalias sret %
S f() { return S(); }
-// CHECK: define void @_Z1f1S(%struct.S*)
+// CHECK-LABEL: define void @_Z1f1S(%struct.S*)
void f(S) { }
// Non-trivial dtors, should both be passed indirectly.
double c;
};
-// CHECK: define void @_Z1gv(%class.C* noalias sret %
+// CHECK-LABEL: define void @_Z1gv(%class.C* noalias sret %
C g() { return C(); }
-// CHECK: define void @_Z1f1C(%class.C*)
+// CHECK-LABEL: define void @_Z1f1C(%class.C*)
void f(C) { }
// PR7058 - Missing byval on MI thunk definition.
-// CHECK: define void @_ZThn4_N18BasicAliasAnalysis13getModRefInfoE8CallSite
+// CHECK-LABEL: define void @_ZThn4_N18BasicAliasAnalysis13getModRefInfoE8CallSite
// ...
// CHECK: %struct.CallSite* byval align 4 %CS)
struct CallSite {
//
// PR7098.
-// CHECK: define i64 @_Z2f0v()
+// CHECK-LABEL: define i64 @_Z2f0v()
struct s0_0 { int x; };
struct s0_1 : s0_0 { int* y; };
s0_1 f0() { return s0_1(); }
-// CHECK: define i32 @_Z2f1v()
+// CHECK-LABEL: define i32 @_Z2f1v()
struct s1_0 { int x; };
struct s1_1 : s1_0 { };
s1_1 f1() { return s1_1(); }
-// CHECK: define double @_Z2f2v()
+// CHECK-LABEL: define double @_Z2f2v()
struct s2_0 { double x; };
struct s2_1 : s2_0 { };
s2_1 f2() { return s2_1(); }
-// CHECK: define double @_Z2f3v()
+// CHECK-LABEL: define double @_Z2f3v()
struct s3_0 { };
struct s3_1 { double x; };
struct s3_2 : s3_0, s3_1 { };
s3_2 f3() { return s3_2(); }
-// CHECK: define i64 @_Z2f4v()
+// CHECK-LABEL: define i64 @_Z2f4v()
struct s4_0 { float x; };
struct s4_1 { float x; };
struct s4_2 : s4_0, s4_1 { };
s4_2 f4() { return s4_2(); }
-// CHECK: define i32* @_Z2f5v()
+// CHECK-LABEL: define i32* @_Z2f5v()
struct s5 { s5(); int &x; };
s5 f5() { return s5(); }
-// CHECK: define i32 @_Z4f6_0M2s6i(i32 %a)
+// CHECK-LABEL: define i32 @_Z4f6_0M2s6i(i32 %a)
// CHECK: define i64 @_Z4f6_1M2s6FivE({ i32, i32 }* byval align 4)
// FIXME: It would be nice to avoid byval on the previous case.
struct s6 {};
s6_mdp f6_0(s6_mdp a) { return a; }
s6_mfp f6_1(s6_mfp a) { return a; }
-// CHECK: define double @_Z2f7v()
+// CHECK-LABEL: define double @_Z2f7v()
struct s7_0 { unsigned : 0; };
struct s7_1 { double x; };
struct s7 : s7_0, s7_1 { };
s7 f7() { return s7(); }
-// CHECK: define void @_Z2f8v(%struct.s8* noalias sret %agg.result)
+// CHECK-LABEL: define void @_Z2f8v(%struct.s8* noalias sret %agg.result)
struct s8_0 { };
struct s8_1 { double x; };
struct s8 { s8_0 a; s8_1 b; };
s8 f8() { return s8(); }
-// CHECK: define void @_Z2f9v(%struct.s9* noalias sret %agg.result)
+// CHECK-LABEL: define void @_Z2f9v(%struct.s9* noalias sret %agg.result)
struct s9_0 { unsigned : 0; };
struct s9_1 { double x; };
struct s9 { s9_0 a; s9_1 b; };
// Basic base class test.
struct f0_s0 { unsigned a; };
struct f0_s1 : public f0_s0 { void *b; };
-// CHECK: define void @_Z2f05f0_s1(i32 %a0.coerce0, i8* %a0.coerce1)
+// CHECK-LABEL: define void @_Z2f05f0_s1(i32 %a0.coerce0, i8* %a0.coerce1)
void f0(f0_s1 a0) { }
// Check with two eight-bytes in base class.
struct f1_s0 { unsigned a; unsigned b; float c; };
struct f1_s1 : public f1_s0 { float d;};
-// CHECK: define void @_Z2f15f1_s1(i64 %a0.coerce0, <2 x float> %a0.coerce1)
+// CHECK-LABEL: define void @_Z2f15f1_s1(i64 %a0.coerce0, <2 x float> %a0.coerce1)
void f1(f1_s1 a0) { }
// Check with two eight-bytes in base class and merge.
struct f2_s0 { unsigned a; unsigned b; float c; };
struct f2_s1 : public f2_s0 { char d;};
-// CHECK: define void @_Z2f25f2_s1(i64 %a0.coerce0, i64 %a0.coerce1)
+// CHECK-LABEL: define void @_Z2f25f2_s1(i64 %a0.coerce0, i64 %a0.coerce1)
void f2(f2_s1 a0) { }
// PR5831
-// CHECK: define void @_Z2f34s3_1(i64 %x.coerce)
+// CHECK-LABEL: define void @_Z2f34s3_1(i64 %x.coerce)
struct s3_0 {};
struct s3_1 { struct s3_0 a; long b; };
void f3(struct s3_1 x) {}
-// CHECK: define i64 @_Z4f4_0M2s4i(i64 %a)
+// CHECK-LABEL: define i64 @_Z4f4_0M2s4i(i64 %a)
// CHECK: define {{.*}} @_Z4f4_1M2s4FivE(i64 %a.coerce0, i64 %a.coerce1)
struct s4 {};
typedef int s4::* s4_mdp;
void AddKeyword(StringRef, int x);
void foo() {
- // CHECK: define void @_ZN6PR75233fooEv()
+ // CHECK-LABEL: define void @_ZN6PR75233fooEv()
// CHECK: call void @_ZN6PR752310AddKeywordENS_9StringRefEi(i8* {{.*}}, i32 4)
AddKeyword(StringRef(), 4);
}
struct c2 : public s2 {};
- // CHECK: define <2 x float> @_ZN6PR77423fooEPNS_2c2E(%"struct.PR7742::c2"* %P)
+ // CHECK-LABEL: define <2 x float> @_ZN6PR77423fooEPNS_2c2E(%"struct.PR7742::c2"* %P)
c2 foo(c2 *P) {
return c2();
}
B1 b1;
};
- // CHECK: define i8* @_ZN6PR51793barENS_2B2E(i32* %b2.coerce)
+ // CHECK-LABEL: define i8* @_ZN6PR51793barENS_2B2E(i32* %b2.coerce)
const void *bar(B2 b2) {
return b2.b1.pa;
}
int test(outer x) {
return x.x + x.f;
}
- // CHECK: define i32 @_ZN5test64testENS_5outerE(i64 %x.coerce0, i32 %x.coerce1)
+ // CHECK-LABEL: define i32 @_ZN5test64testENS_5outerE(i64 %x.coerce0, i32 %x.coerce1)
}
namespace test7 {
void test0(int i) {
block_t block = ^{ use_int(i); };
- // CHECK: define void @test0(
+ // CHECK-LABEL: define void @test0(
// CHECK: call i8* @objc_retainBlock(i8* {{%.*}}) [[NUW:#[0-9]+]], !clang.arc.copy_on_escape
// CHECK: ret void
}
void test1(int i) {
id block = ^{ use_int(i); };
- // CHECK: define void @test1(
+ // CHECK-LABEL: define void @test1(
// CHECK: call i8* @objc_retainBlock(i8* {{%.*}}) [[NUW]]
// CHECK-NOT: !clang.arc.copy_on_escape
// CHECK: ret void
}
int (^test1(int x))(void) {
- // CHECK: define i32 ()* @test1(
+ // CHECK-LABEL: define i32 ()* @test1(
// CHECK: [[X:%.*]] = alloca i32,
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK-NEXT: store i32 {{%.*}}, i32* [[X]]
}
void test2(id x) {
-// CHECK: define void @test2(
+// CHECK-LABEL: define void @test2(
// CHECK: [[X:%.*]] = alloca i8*,
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK-NEXT: [[PARM:%.*]] = call i8* @objc_retain(i8* {{%.*}})
extern void test2_helper(id (^)(void));
test2_helper(^{ return x; });
-// CHECK: define internal void @__copy_helper_block_
+// CHECK-LABEL: define internal void @__copy_helper_block_
// CHECK: [[T0:%.*]] = load i8**
// CHECK-NEXT: [[SRC:%.*]] = bitcast i8* [[T0]] to [[BLOCK_T]]*
// CHECK-NEXT: [[T0:%.*]] = load i8**
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]]) [[NUW]]
// CHECK-NEXT: ret void
-// CHECK: define internal void @__destroy_helper_block_
+// CHECK-LABEL: define internal void @__destroy_helper_block_
// CHECK: [[T0:%.*]] = load i8**
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[BLOCK_T]]*
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[T1]], i32 0, i32 5
__strong id strong;
sink(&strong);
- // CHECK: define void @test3(
+ // CHECK-LABEL: define void @test3(
// CHECK: [[SINK:%.*]] = alloca void (i8**)*
// CHECK-NEXT: [[STRONG:%.*]] = alloca i8*
// CHECK-NEXT: [[TEMP:%.*]] = alloca i8*
__block id var = test4_source();
test4_helper(^{ var = 0; });
- // CHECK: define void @test4()
+ // CHECK-LABEL: define void @test4()
// CHECK: [[VAR:%.*]] = alloca [[BYREF_T:%.*]],
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]]* [[VAR]], i32 0, i32 2
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
// CHECK: ret void
- // CHECK: define internal void @__Block_byref_object_copy_
+ // CHECK-LABEL: define internal void @__Block_byref_object_copy_
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]]* {{%.*}}, i32 0, i32 6
// CHECK-NEXT: load i8**
// CHECK-NEXT: bitcast i8* {{%.*}} to [[BYREF_T]]*
// CHECK-NEXT: store i8* [[T2]], i8** [[T0]]
// CHECK-NEXT: store i8* null, i8** [[T1]]
- // CHECK: define internal void @__Block_byref_object_dispose_
+ // CHECK-LABEL: define internal void @__Block_byref_object_dispose_
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]]* {{%.*}}, i32 0, i32 6
// CHECK-NEXT: [[T1:%.*]] = load i8** [[T0]]
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
- // CHECK: define internal void @__test4_block_invoke
+ // CHECK-LABEL: define internal void @__test4_block_invoke
// CHECK: [[SLOT:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 6
// CHECK-NEXT: [[T0:%.*]] = load i8** [[SLOT]], align 8
// CHECK-NEXT: store i8* null, i8** [[SLOT]],
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
// CHECK-NEXT: ret void
- // CHECK: define internal void @__copy_helper_block_
+ // CHECK-LABEL: define internal void @__copy_helper_block_
// CHECK: call void @_Block_object_assign(i8* {{%.*}}, i8* {{%.*}}, i32 8)
- // CHECK: define internal void @__destroy_helper_block_
+ // CHECK-LABEL: define internal void @__destroy_helper_block_
// CHECK: call void @_Block_object_dispose(i8* {{%.*}}, i32 8)
}
__unsafe_unretained id var = test5_source();
test5_helper(^{ (void) var; });
- // CHECK: define void @test5()
+ // CHECK-LABEL: define void @test5()
// CHECK: [[VAR:%.*]] = alloca i8*
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK: [[T0:%.*]] = call i8* @test5_source()
__block __weak id var = test6_source();
test6_helper(^{ var = 0; });
- // CHECK: define void @test6()
+ // CHECK-LABEL: define void @test6()
// CHECK: [[VAR:%.*]] = alloca [[BYREF_T:%.*]],
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]]* [[VAR]], i32 0, i32 2
// CHECK-NEXT: call void @objc_destroyWeak(i8** [[SLOT]])
// CHECK: ret void
- // CHECK: define internal void @__Block_byref_object_copy_
+ // CHECK-LABEL: define internal void @__Block_byref_object_copy_
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]]* {{%.*}}, i32 0, i32 6
// CHECK-NEXT: load i8**
// CHECK-NEXT: bitcast i8* {{%.*}} to [[BYREF_T]]*
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds [[BYREF_T]]* {{%.*}}, i32 0, i32 6
// CHECK-NEXT: call void @objc_moveWeak(i8** [[T0]], i8** [[T1]])
- // CHECK: define internal void @__Block_byref_object_dispose_
+ // CHECK-LABEL: define internal void @__Block_byref_object_dispose_
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]]* {{%.*}}, i32 0, i32 6
// CHECK-NEXT: call void @objc_destroyWeak(i8** [[T0]])
- // CHECK: define internal void @__test6_block_invoke
+ // CHECK-LABEL: define internal void @__test6_block_invoke
// CHECK: [[SLOT:%.*]] = getelementptr inbounds {{.*}}, i32 0, i32 6
// CHECK-NEXT: call i8* @objc_storeWeak(i8** [[SLOT]], i8* null)
// CHECK-NEXT: ret void
- // CHECK: define internal void @__copy_helper_block_
+ // CHECK-LABEL: define internal void @__copy_helper_block_
// 0x8 - FIELD_IS_BYREF (no FIELD_IS_WEAK because clang in control)
// CHECK: call void @_Block_object_assign(i8* {{%.*}}, i8* {{%.*}}, i32 8)
- // CHECK: define internal void @__destroy_helper_block_
+ // CHECK-LABEL: define internal void @__destroy_helper_block_
// 0x8 - FIELD_IS_BYREF (no FIELD_IS_WEAK because clang in control)
// CHECK: call void @_Block_object_dispose(i8* {{%.*}}, i32 8)
}
__weak id var = test7_source();
test7_helper(^{ test7_consume(var); });
- // CHECK: define void @test7()
+ // CHECK-LABEL: define void @test7()
// CHECK: [[VAR:%.*]] = alloca i8*,
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK: [[T0:%.*]] = call i8* @test7_source()
// CHECK-NEXT: call void @objc_destroyWeak(i8** [[VAR]])
// CHECK: ret void
- // CHECK: define internal void @__test7_block_invoke
+ // CHECK-LABEL: define internal void @__test7_block_invoke
// CHECK: [[SLOT:%.*]] = getelementptr inbounds [[BLOCK_T]]* {{%.*}}, i32 0, i32 5
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_loadWeakRetained(i8** [[SLOT]])
// CHECK-NEXT: call void @test7_consume(i8* [[T0]])
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
// CHECK: ret void
- // CHECK: define internal void @__copy_helper_block_
+ // CHECK-LABEL: define internal void @__copy_helper_block_
// CHECK: getelementptr
// CHECK-NEXT: getelementptr
// CHECK-NEXT: call void @objc_copyWeak(
- // CHECK: define internal void @__destroy_helper_block_
+ // CHECK-LABEL: define internal void @__destroy_helper_block_
// CHECK: getelementptr
// CHECK-NEXT: call void @objc_destroyWeak(
}
return test9_produce();
}();
-// CHECK: define i8* @test9(
+// CHECK-LABEL: define i8* @test9(
// CHECK: load i8** getelementptr
// CHECK-NEXT: bitcast i8*
// CHECK-NEXT: call i8*
// when the initialization captures the variable.
void test10a(void) {
__block void (^block)(void) = ^{ block(); };
- // CHECK: define void @test10a()
+ // CHECK-LABEL: define void @test10a()
// CHECK: [[BYREF:%.*]] = alloca [[BYREF_T:%.*]],
// Zero-initialization before running the initializer.
// We can also use _Block_object_assign/destroy with
// BLOCK_FIELD_IS_BLOCK as long as we don't pass BLOCK_BYREF_CALLER.
-// CHECK: define internal void @__Block_byref_object_copy
+// CHECK-LABEL: define internal void @__Block_byref_object_copy
// CHECK: [[D0:%.*]] = load i8** {{%.*}}
// CHECK-NEXT: [[D1:%.*]] = bitcast i8* [[D0]] to [[BYREF_T]]*
// CHECK-NEXT: [[D2:%.*]] = getelementptr inbounds [[BYREF_T]]* [[D1]], i32 0, i32 6
// CHECK-NEXT: store void ()* [[T3]], void ()** [[D2]], align 8
// CHECK: ret void
-// CHECK: define internal void @__Block_byref_object_dispose
+// CHECK-LABEL: define internal void @__Block_byref_object_dispose
// CHECK: [[T0:%.*]] = load i8** {{%.*}}
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[BYREF_T]]*
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[BYREF_T]]* [[T1]], i32 0, i32 6
__block void (^block)(void);
block = ^{ block(); };
- // CHECK: define void @test10b()
+ // CHECK-LABEL: define void @test10b()
// CHECK: [[BYREF:%.*]] = alloca [[BYREF_T:%.*]],
// Zero-initialize.
int x;
test11_helper(^{ (void) x; });
- // CHECK: define void @test11a()
+ // CHECK-LABEL: define void @test11a()
// CHECK: [[X:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]], align 8
// CHECK: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
int x;
id b = ^{ (void) x; };
- // CHECK: define void @test11b()
+ // CHECK-LABEL: define void @test11b()
// CHECK: [[X:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[B:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]], align 8
void (^b)(void) = (x ? ^{test13_helper(x);} : 0);
test13_use(b);
- // CHECK: define void @test13(
+ // CHECK-LABEL: define void @test13(
// CHECK: [[X:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[B:%.*]] = alloca void ()*, align 8
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:.*]], align 8
void test16() {
void (^BLKVAR)(void) = ^{ BLKVAR(); };
- // CHECK: define void @test16(
+ // CHECK-LABEL: define void @test16(
// CHECK: [[BLKVAR:%.*]] = alloca void ()*, align 8
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK-NEXT: [[SLOTREL:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
}
return (void*) 0;
}
-// CHECK: define i8* ()* @test17(
+// CHECK-LABEL: define i8* ()* @test17(
// CHECK: [[RET:%.*]] = alloca i8* ()*, align
// CHECK-NEXT: [[SELF:%.*]] = alloca i8*,
// CHECK: [[B0:%.*]] = alloca [[BLOCK:<.*>]], align
// CHECK-NEXT: br label
void test18(id x) {
-// CHECK-UNOPT: define void @test18(
+// CHECK-UNOPT-LABEL: define void @test18(
// CHECK-UNOPT: [[X:%.*]] = alloca i8*,
// CHECK-UNOPT-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// CHECK-UNOPT-NEXT: store i8* null, i8** [[X]]
extern void test18_helper(id (^)(void));
test18_helper(^{ return x; });
-// CHECK-UNOPT: define internal void @__copy_helper_block_
+// CHECK-UNOPT-LABEL: define internal void @__copy_helper_block_
// CHECK-UNOPT: [[T0:%.*]] = load i8**
// CHECK-UNOPT-NEXT: [[SRC:%.*]] = bitcast i8* [[T0]] to [[BLOCK_T]]*
// CHECK-UNOPT-NEXT: [[T0:%.*]] = load i8**
// CHECK-UNOPT-NEXT: call void @objc_storeStrong(i8** [[T1]], i8* [[T2]]) [[NUW]]
// CHECK-UNOPT-NEXT: ret void
-// CHECK-UNOPT: define internal void @__destroy_helper_block_
+// CHECK-UNOPT-LABEL: define internal void @__destroy_helper_block_
// CHECK-UNOPT: [[T0:%.*]] = load i8**
// CHECK-UNOPT-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[BLOCK_T]]*
// CHECK-UNOPT-NEXT: [[T2:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[T1]], i32 0, i32 5
// rdar://13588325
void test19_sink(void (^)(int));
void test19(void (^b)(void)) {
-// CHECK: define void @test19(
+// CHECK-LABEL: define void @test19(
// Prologue.
// CHECK: [[B:%.*]] = alloca void ()*,
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
id CreateSomething(void);
NSString *CreateNSString(void);
-// CHECK: define void @bridge_transfer_from_cf
+// CHECK-LABEL: define void @bridge_transfer_from_cf
void bridge_transfer_from_cf(int *i) {
// CHECK: store i32 7
*i = 7;
// CHECK-NEXT: ret void
}
-// CHECK: define void @bridge_from_cf
+// CHECK-LABEL: define void @bridge_from_cf
void bridge_from_cf(int *i) {
// CHECK: store i32 7
*i = 7;
// CHECK-NEXT: ret void
}
-// CHECK: define void @bridge_retained_of_cf
+// CHECK-LABEL: define void @bridge_retained_of_cf
void bridge_retained_of_cf(int *i) {
*i = 7;
// CHECK: call i8* @CreateSomething()
// CHECK-NEXT: ret void
}
-// CHECK: define void @bridge_of_cf
+// CHECK-LABEL: define void @bridge_of_cf
void bridge_of_cf(int *i) {
// CHECK: store i32 7
*i = 7;
} @catch (Ety *e) {
}
}
-// CHECK: define void @test0()
+// CHECK-LABEL: define void @test0()
// CHECK: [[E:%.*]] = alloca [[ETY:%.*]]*, align 8
// CHECK-NEXT: invoke void @test0_helper()
// CHECK: [[T0:%.*]] = call i8* @objc_begin_catch(
} @catch (__weak Ety *e) {
}
}
-// CHECK: define void @test1()
+// CHECK-LABEL: define void @test1()
// CHECK: [[E:%.*]] = alloca [[ETY:%.*]]*, align 8
// CHECK-NEXT: invoke void @test1_helper()
// CHECK: [[T0:%.*]] = call i8* @objc_begin_catch(
}
}
-// CHECK-LP64: define void @test0(
+// CHECK-LP64-LABEL: define void @test0(
// CHECK-LP64: [[ARRAY:%.*]] = alloca [[ARRAY_T:%.*]]*,
// CHECK-LP64-NEXT: [[X:%.*]] = alloca i8*,
// CHECK-LP64-NEXT: [[STATE:%.*]] = alloca [[STATE_T:%.*]],
// CHECK-LP64-NEXT: call void @objc_storeStrong(i8** [[T0]], i8* null)
// CHECK-LP64-NEXT: ret void
-// CHECK-LP64: define internal void @__test0_block_invoke
+// CHECK-LP64-LABEL: define internal void @__test0_block_invoke
// CHECK-LP64: [[BLOCK:%.*]] = bitcast i8* {{%.*}} to [[BLOCK_T]]*
// CHECK-LP64-NOT: ret
// CHECK-LP64: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
}
}
-// CHECK-LP64: define void @test1(
+// CHECK-LP64-LABEL: define void @test1(
// CHECK-LP64: alloca [[ARRAY_T:%.*]]*,
// CHECK-LP64-NEXT: [[X:%.*]] = alloca i8*,
// CHECK-LP64-NEXT: [[STATE:%.*]] = alloca [[STATE_T:%.*]],
}
}
-// CHECK-LP64: define void @test2(
+// CHECK-LP64-LABEL: define void @test2(
// CHECK-LP64: [[T0:%.*]] = call [[ARRAY_T]]* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to [[ARRAY_T]]* (i8*, i8*)*)(
// CHECK-LP64-NEXT: [[T1:%.*]] = bitcast [[ARRAY_T]]* [[T0]] to i8*
// CHECK-LP64-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
use(x);
}
- // CHECK-LP64: define void @test3(
+ // CHECK-LP64-LABEL: define void @test3(
// CHECK-LP64: [[ARRAY:%.*]] = alloca [[ARRAY_T]]*, align 8
// CHECK-LP64-NEXT: [[X:%.*]] = alloca i8*, align 8
// CHECK-LP64: [[T0:%.*]] = load i8** [[X]], align 8
// CHECK: c"dictionaryWithObjects:forKeys:count:\00"
// CHECK: c"prop\00"
-// CHECK: define void @test_numeric()
+// CHECK-LABEL: define void @test_numeric()
void test_numeric() {
// CHECK: {{call.*objc_msgSend.*i32 17}}
// CHECK: call i8* @objc_retainAutoreleasedReturnValue
// CHECK-NEXT: ret void
}
-// CHECK: define void @test_array
+// CHECK-LABEL: define void @test_array
void test_array(id a, id b) {
// CHECK: [[A:%.*]] = alloca i8*,
// CHECK: [[B:%.*]] = alloca i8*,
// CHECK-NEXT: ret void
}
-// CHECK: define void @test_dictionary
+// CHECK-LABEL: define void @test_dictionary
void test_dictionary(id k1, id o1, id k2, id o2) {
// CHECK: [[K1:%.*]] = alloca i8*,
// CHECK: [[O1:%.*]] = alloca i8*,
@property (retain) A* prop;
@end
-// CHECK: define void @test_property
+// CHECK-LABEL: define void @test_property
void test_property(B *b) {
// Retain parameter
// CHECK: call i8* @objc_retain
test34_sink(cond ? &weak : 0);
}
-// CHECK: define void @test1(
+// CHECK-LABEL: define void @test1(
// CHECK: [[CONDADDR:%.*]] = alloca i32
// CHECK-NEXT: [[WEAK:%.*]] = alloca i8*
// CHECK-NEXT: [[INCRTEMP:%.*]] = alloca i8*
void thrower(void);
void not(void) __attribute__((nothrow));
-// CHECK: define void @test0(
+// CHECK-LABEL: define void @test0(
// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
// CHECK: call void @not() [[NUW:#[0-9]+]], !clang.arc.no_objc_arc_exceptions !
-// NO-METADATA: define void @test0(
+// NO-METADATA-LABEL: define void @test0(
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
// NO-METADATA: }
void test0(void) {
not();
}
-// CHECK: define void @test1(
+// CHECK-LABEL: define void @test1(
// CHECK: call void @thrower(), !clang.arc.no_objc_arc_exceptions !
// CHECK: call void @not() [[NUW]], !clang.arc.no_objc_arc_exceptions !
-// NO-METADATA: define void @test1(
+// NO-METADATA-LABEL: define void @test1(
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
// NO-METADATA: }
void test1(id x) {
void NSLog(id, ...);
-// CHECK: define void @test2(
+// CHECK-LABEL: define void @test2(
// CHECK: invoke void (i8*, ...)* @NSLog(i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_ to i8*), i32* %{{.*}})
// CHECK: to label %{{.*}} unwind label %{{.*}}, !clang.arc.no_objc_arc_exceptions !
-// NO-METADATA: define void @test2(
+// NO-METADATA-LABEL: define void @test2(
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
// NO-METADATA: }
void test2(void) {
}
}
-// CHECK: define void @test3(
+// CHECK-LABEL: define void @test3(
// CHECK: invoke void %{{.*}}(i8* %{{.*}})
// CHECK: to label %{{.*}} unwind label %{{.*}}, !clang.arc.no_objc_arc_exceptions !
-// NO-METADATA: define void @test3(
+// NO-METADATA-LABEL: define void @test3(
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
// NO-METADATA: }
void test3(void) {
}
}
-// CHECK: define void @test4(
+// CHECK-LABEL: define void @test4(
// CHECK: invoke void %{{.*}}(i8* %{{.*}})
// CHECK: to label %{{.*}} unwind label %{{.*}}, !clang.arc.no_objc_arc_exceptions !
-// NO-METADATA: define void @test4(
+// NO-METADATA-LABEL: define void @test4(
// NO-METADATA-NOT: !clang.arc.no_objc_arc_exceptions
// NO-METADATA: }
void test4(void) {
@end
extern Test1 *test1_helper(void);
-// CHECK: define void @test1a()
+// CHECK-LABEL: define void @test1a()
void test1a(void) {
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
char *c = [(ptr) interior];
}
-// CHECK: define void @test1b()
+// CHECK-LABEL: define void @test1b()
void test1b(void) {
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
id ivar;
}
@end
-// CHECK: define void @test2(
+// CHECK-LABEL: define void @test2(
void test2(Test2 *x) {
x->ivar = 0;
// CHECK: [[X:%.*]] = alloca [[TEST2:%.*]]*
// CHECK-NEXT: ret void
}
-// CHECK: define void @test3(i8*
+// CHECK-LABEL: define void @test3(i8*
void test3(PRECISE_LIFETIME id x) {
// CHECK: [[X:%.*]] = alloca i8*,
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* {{%.*}}) [[NUW]]
void test0(Test0 *t0, id value) {
t0.value = value;
}
-// CHECK: define void @test0(
+// CHECK-LABEL: define void @test0(
// CHECK: call void @objc_storeStrong
// CHECK: call void @objc_storeStrong
// CHECK: @objc_msgSend
void test0(Test0 *val) {
Test0 *x = [val self];
-// CHECK: define void @test0(
+// CHECK-LABEL: define void @test0(
// CHECK: [[VAL:%.*]] = alloca [[TEST0:%.*]]*
// CHECK-NEXT: [[X:%.*]] = alloca [[TEST0]]*
// CHECK-NEXT: store [[TEST0]]* null
void test0(_Bool cond) {
id test0_helper(void) __attribute__((ns_returns_retained));
- // CHECK: define void @test0(
+ // CHECK-LABEL: define void @test0(
// CHECK: [[COND:%.*]] = alloca i8,
// CHECK-NEXT: [[X:%.*]] = alloca i8*,
// CHECK-NEXT: [[RELVAL:%.*]] = alloca i8*
test1_sink(cond ? &strong : 0);
test1_sink(cond ? &weak : 0);
- // CHECK: define void @test1(
+ // CHECK-LABEL: define void @test1(
// CHECK: [[COND:%.*]] = alloca i32
// CHECK-NEXT: [[STRONG:%.*]] = alloca i8*
// CHECK-NEXT: [[WEAK:%.*]] = alloca i8*
for (id obj in cond ? test2_producer() : (void*) 0) {
}
- // CHECK: define void @test2(
+ // CHECK-LABEL: define void @test2(
// CHECK: [[COND:%.*]] = alloca i32,
// CHECK: alloca i8*
// CHECK: [[CLEANUP_SAVE:%.*]] = alloca i8*
if ((x = y))
y = 0;
-// CHECK: define void @test5()
+// CHECK-LABEL: define void @test5()
// CHECK: [[X:%.*]] = alloca [[TEST5:%.*]]*,
// CHECK-NEXT: [[Y:%.*]] = alloca [[TEST5:%.*]]*,
// CHECK-NEXT: store [[TEST5]]* null, [[TEST5]]** [[X]],
void test19() {
__block id x;
-// CHECK-UNOPT: define internal void @__Block_byref_object_copy
+// CHECK-UNOPT-LABEL: define internal void @__Block_byref_object_copy
// CHECK-UNOPT: [[X:%.*]] = getelementptr inbounds [[BYREF_T:%.*]]* [[VAR:%.*]], i32 0, i32 6
// CHECK-UNOPT: [[X2:%.*]] = getelementptr inbounds [[BYREF_T:%.*]]* [[VAR1:%.*]], i32 0, i32 6
// CHECK-UNOPT-NEXT: [[SIX:%.*]] = load i8** [[X2]], align 8
// TODO: We should probably emit this specific pattern without the reclaim.
-// CHECK: define void @test()
+// CHECK-LABEL: define void @test()
// CHECK: [[T0:%.*]] = call i8* @make()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_autorelease(i8* [[T1]])
// ARC-NATIVE: declare i8* @objc_autorelease(i8*)
// ARC-NATIVE: declare i8* @objc_retainAutorelease(i8*)
-// CHECK: define void @test0
+// CHECK-LABEL: define void @test0
void test0(id x) {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[PARM:%.*]] = call i8* @objc_retain(i8* {{.*}})
// CHECK-NEXT: ret void
}
-// CHECK: define i8* @test1(i8*
+// CHECK-LABEL: define i8* @test1(i8*
id test1(id x) {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[Y:%.*]] = alloca i8*
- (id) copy;
@end
-// CHECK: define void @test3_unelided()
+// CHECK-LABEL: define void @test3_unelided()
void test3_unelided() {
extern void test3_helper(void);
// CHECK-NEXT: ret void
}
-// CHECK: define void @test3()
+// CHECK-LABEL: define void @test3()
void test3() {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: ret void
}
-// CHECK: define i8* @test4()
+// CHECK-LABEL: define i8* @test4()
id test4() {
// Call to +alloc.
// CHECK: load {{.*}}* @"\01L_OBJC_CLASSLIST_REFERENCES_
}
@end
-// CHECK: define void @test5
+// CHECK-LABEL: define void @test5
void test5(Test5 *x, id y) {
// Prologue.
// CHECK: [[X:%.*]] = alloca [[TEST5:%.*]]*,
}
id test6_helper(void) __attribute__((ns_returns_retained));
-// CHECK: define void @test6()
+// CHECK-LABEL: define void @test6()
void test6() {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test6_helper()
}
void test7_helper(id __attribute__((ns_consumed)));
-// CHECK: define void @test7()
+// CHECK-LABEL: define void @test7()
void test7() {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: store i8* null, i8** [[X]]
Test10 *x;
id y = x.me.me;
- // CHECK: define void @test10()
+ // CHECK-LABEL: define void @test10()
// CHECK: [[X:%.*]] = alloca [[TEST10:%.*]]*, align
// CHECK-NEXT: [[Y:%.*]] = alloca i8*, align
// CHECK-NEXT: store [[TEST10]]* null, [[TEST10]]** [[X]]
}
void test11(id (*f)(void) __attribute__((ns_returns_retained))) {
- // CHECK: define void @test11(
+ // CHECK-LABEL: define void @test11(
// CHECK: [[F:%.*]] = alloca i8* ()*, align
// CHECK-NEXT: [[X:%.*]] = alloca i8*, align
// CHECK-NEXT: store i8* ()* {{%.*}}, i8* ()** [[F]], align
void test12(void) {
extern id test12_helper(void);
- // CHECK: define void @test12()
+ // CHECK-LABEL: define void @test12()
// CHECK: [[X:%.*]] = alloca i8*, align
// CHECK-NEXT: [[Y:%.*]] = alloca i8*, align
// Indirect consuming calls.
void test13(void) {
- // CHECK: define void @test13()
+ // CHECK-LABEL: define void @test13()
// CHECK: [[X:%.*]] = alloca i8*, align
// CHECK-NEXT: store i8* null, i8** [[X]], align
id x;
@end
void test19() {
- // CHECK: define void @test19()
+ // CHECK-LABEL: define void @test19()
// CHECK: [[X:%.*]] = alloca [5 x i8*], align 16
// CHECK: call void @llvm.lifetime.start
// CHECK-NEXT: [[T0:%.*]] = bitcast [5 x i8*]* [[X]] to i8*
}
void test20(unsigned n) {
- // CHECK: define void @test20
+ // CHECK-LABEL: define void @test20
// CHECK: [[N:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[SAVED_STACK:%.*]] = alloca i8*
// CHECK-NEXT: store i32 {{%.*}}, i32* [[N]], align 4
}
void test21(unsigned n) {
- // CHECK: define void @test21
+ // CHECK-LABEL: define void @test21
// CHECK: [[N:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[SAVED_STACK:%.*]] = alloca i8*
// CHECK-NEXT: store i32 {{%.*}}, i32* [[N]], align 4
@end
__attribute__((ns_returns_retained)) id test32(void) {
-// CHECK: define i8* @test32()
+// CHECK-LABEL: define i8* @test32()
// CHECK: [[CALL:%.*]] = call i8* @test32_helper()
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[CALL]])
// CHECK-NEXT: ret i8* [[T0]]
}
-// CHECK: define void @test36
+// CHECK-LABEL: define void @test36
void test36(id x) {
// CHECK: [[X:%.*]] = alloca i8*
Test37 *var;
test37_helper(&var);
- // CHECK: define void @test37()
+ // CHECK-LABEL: define void @test37()
// CHECK: [[VAR:%.*]] = alloca [[TEST37:%.*]]*,
// CHECK-NEXT: [[TEMP:%.*]] = alloca i8*
// CHECK-NEXT: store [[TEST37]]* null, [[TEST37]]** [[VAR]]
extern id test47_helper(void);
id x = x = test47_helper();
- // CHECK: define void @test47()
+ // CHECK-LABEL: define void @test47()
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test47_helper()
void test48(void) {
extern id test48_helper(void);
__weak id x = x = test48_helper();
- // CHECK: define void @test48()
+ // CHECK-LABEL: define void @test48()
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_initWeak(i8** [[X]], i8* null)
// CHECK-NEXT: [[T1:%.*]] = call i8* @test48_helper()
void test49(void) {
extern id test49_helper(void);
__autoreleasing id x = x = test49_helper();
- // CHECK: define void @test49()
+ // CHECK-LABEL: define void @test49()
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test49_helper()
id test52_helper(int) __attribute__((ns_returns_retained));
return ({ int x = 5; test52_helper(x); });
-// CHECK: define i8* @test52()
+// CHECK-LABEL: define i8* @test52()
// CHECK: [[X:%.*]] = alloca i32
// CHECK-NEXT: [[TMPALLOCA:%.*]] = alloca i8*
// CHECK-NEXT: store i32 5, i32* [[X]],
id test53_helper(void);
id x = ({ id y = test53_helper(); y; });
(void) x;
-// CHECK: define void @test53()
+// CHECK-LABEL: define void @test53()
// CHECK: [[X:%.*]] = alloca i8*,
// CHECK-NEXT: [[Y:%.*]] = alloca i8*,
// CHECK-NEXT: [[TMPALLOCA:%.*]] = alloca i8*,
}
// <rdar://problem/9758798>
-// CHECK: define void @test54(i32 %first, ...)
+// CHECK-LABEL: define void @test54(i32 %first, ...)
void test54(int first, ...) {
__builtin_va_list arglist;
// CHECK: call void @llvm.va_start
@end
void test56_test(void) {
id x = [Test56 make];
- // CHECK: define void @test56_test()
+ // CHECK-LABEL: define void @test56_test()
// CHECK: [[X:%.*]] = alloca i8*, align 8
// CHECK: [[T0:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(
// CHECK-NEXT: store i8* [[T0]], i8** [[X]]
test59_body();
}
- // CHECK: define void @test59()
+ // CHECK-LABEL: define void @test59()
// CHECK: [[T0:%.*]] = call i8* @test59_getlock()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: call i32 @objc_sync_enter(i8* [[T1]])
- (id) test61_id;
@end
void test61(void) {
- // CHECK: define void @test61()
+ // CHECK-LABEL: define void @test61()
// CHECK: [[Y:%.*]] = alloca i8*, align 8
extern id test61_make(void);
// rdar://problem/9891815
void test62(void) {
- // CHECK: define void @test62()
+ // CHECK-LABEL: define void @test62()
// CHECK: [[I:%.*]] = alloca i32, align 4
// CHECK-NEXT: [[CLEANUP_VALUE:%.*]] = alloca i8*
// CHECK-NEXT: [[CLEANUP_REQUIRED:%.*]] = alloca i1
extern id test66_arg(void);
[test66_receiver() consume: test66_arg()];
}
-// CHECK: define void @test66()
+// CHECK-LABEL: define void @test66()
// CHECK: [[T0:%.*]] = call [[TEST66:%.*]]* @test66_receiver()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST66]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
void test67(void) {
Class cl = test67_helper();
}
-// CHECK: define void @test67()
+// CHECK-LABEL: define void @test67()
// CHECK: [[CL:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[T0:%.*]] = call i8* @test67_helper()
// CHECK-NEXT: store i8* [[T0]], i8** [[CL]], align 8
void test68(void) {
__strong Class cl = test67_helper();
}
-// CHECK: define void @test68()
+// CHECK-LABEL: define void @test68()
// CHECK: [[CL:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[T0:%.*]] = call i8* @test67_helper()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// rdar://problem/10907547
void test70(id i) {
- // CHECK: define void @test70
+ // CHECK-LABEL: define void @test70
// CHECK: store i8* null, i8**
// CHECK: store i8* null, i8**
// CHECK: [[ID:%.*]] = call i8* @objc_retain(i8*
// Check that we get exactly the message sends we expect, and no more.
//
-// CHECK: define void @f0
+// CHECK-LABEL: define void @f0
void f0(C0 *a) {
// CHECK: objc_msgSend
int l0 = (a.x0 = 1);
return 0;
}
}
-// CHECK: define i32 @tryTo(i32 ()*
+// CHECK-LABEL: define i32 @tryTo(i32 ()*
// CHECK: [[RET:%.*]] = alloca i32,
// CHECK: [[T0:%.*]] = call i8* @objc_autoreleasePoolPush()
// CHECK-NEXT: [[T1:%.*]] = load i32 ()** {{%.*}},
// Check that we don't try to use an i32 load here, which would reach beyond the
// end of the structure.
//
-// CHECK-I386: define i32 @f0(
+// CHECK-I386-LABEL: define i32 @f0(
// CHECK-I386: [[t0_0:%.*]] = load i8* {{.*}}, align 1
// CHECK-I386: lshr i8 [[t0_0]], 7
// CHECK-I386: }
// Check that we can handled straddled loads.
//
-// CHECK-ARM: define i32 @f1(
+// CHECK-ARM-LABEL: define i32 @f1(
// CHECK-ARM: [[t1_ptr:%.*]] = getelementptr
// CHECK-ARM: [[t1_base:%.*]] = bitcast i8* [[t1_ptr]] to i40*
// CHECK-ARM: [[t1_0:%.*]] = load i40* [[t1_base]], align 1
// rdar://8893785
void MYFUNC() {
-// CHECK: define void @MYFUNC()
+// CHECK-LABEL: define void @MYFUNC()
// CHECK: [[OBSERVER_SLOT:%.*]] = alloca [[OBSERVER_T:%.*]], align 8
// CHECK: [[T0:%.*]] = getelementptr inbounds [[OBSERVER_T]]* [[OBSERVER_SLOT]], i32 0, i32 1
@interface Test2 -(void) destroy; @end
void test2(Test2 *x) {
extern void test2_helper(void (^)(void));
- // CHECK: define void @test2(
+ // CHECK-LABEL: define void @test2(
// CHECK: [[X:%.*]] = alloca [[TEST2:%.*]]*,
// CHECK-NEXT: [[WEAKX:%.*]] = alloca [[WEAK_T:%.*]],
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
// rdar://problem/9124263
// In the test above, check that the use in the invocation function
// doesn't require a read barrier.
-// CHECK: define internal void @__test2_block_invoke
+// CHECK-LABEL: define internal void @__test2_block_invoke
// CHECK: [[BLOCK:%.*]] = bitcast i8* {{%.*}} to [[BLOCK_T]]*
// CHECK-NOT: bitcast
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
void test3(void (^block)(int, ...)) {
block(0, 1, 2, 3);
}
-// CHECK: define void @test3(
+// CHECK-LABEL: define void @test3(
// CHECK: [[BLOCK:%.*]] = alloca void (i32, ...)*, align 4
// CHECK-NEXT: store void (i32, ...)*
// CHECK-NEXT: [[T0:%.*]] = load void (i32, ...)** [[BLOCK]], align 4
void test4(void (^block)()) {
block(0, 1, 2, 3);
}
-// CHECK: define void @test4(
+// CHECK-LABEL: define void @test4(
// CHECK: [[BLOCK:%.*]] = alloca void (...)*, align 4
// CHECK-NEXT: store void (...)*
// CHECK-NEXT: [[T0:%.*]] = load void (...)** [[BLOCK]], align 4
void test0(id receiver, SEL sel, const char *str) {
short s = ((short (*)(id, SEL, const char*)) objc_msgSend)(receiver, sel, str);
}
-// CHECK: define void @test0(
+// CHECK-LABEL: define void @test0(
// CHECK: call signext i16 bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i16 (i8*, i8*, i8*)*)(
test2_helper();
}
- // CHECK: define void @test2()
+ // CHECK-LABEL: define void @test2()
// CHECK-NOT: call void @test2_helper()
}
}
}
-// CHECK: define void @f1()
+// CHECK-LABEL: define void @f1()
void f1() {
extern void foo(void);
// Test that modifications to local variables are respected under
// optimization. rdar://problem/8160285
-// CHECK: define i32 @f2()
+// CHECK-LABEL: define i32 @f2()
int f2() {
extern void foo(void);
// Test that the cleanup destination is saved when entering a finally
// block. rdar://problem/8293901
-// CHECK: define void @f3()
+// CHECK-LABEL: define void @f3()
void f3() {
extern void f3_helper(int, int*);
void f4() {
extern void f4_help(int);
- // CHECK: define void @f4()
+ // CHECK-LABEL: define void @f4()
// CHECK: [[EXNDATA:%.*]] = alloca [[EXNDATA_T:%.*]], align
// CHECK: call void @objc_exception_try_enter([[EXNDATA_T]]* [[EXNDATA]])
// CHECK: call i32 @_setjmp
@end
-// CHECK-X86_32: define void @t0()
+// CHECK-X86_32-LABEL: define void @t0()
// CHECK-X86_32: call void bitcast {{.*}} @objc_msgSend_stret to
// CHECK-X86_32: }
//
-// CHECK-X86_64: define void @t0()
+// CHECK-X86_64-LABEL: define void @t0()
// CHECK-X86_64: call { x86_fp80, x86_fp80 } bitcast {{.*}} @objc_msgSend_fp2ret to
// CHECK-X86_64: }
//
-// CHECK-ARMV7: define void @t0()
+// CHECK-ARMV7-LABEL: define void @t0()
// CHECK-ARMV7: call i128 bitcast {{.*}} @objc_msgSend to
// CHECK-ARMV7: }
void t0() {
@end
-// CHECK-X86_32: define void @t0()
+// CHECK-X86_32-LABEL: define void @t0()
// CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to
// CHECK-X86_32: call double bitcast {{.*}} @objc_msgSend_fpret to
// CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
// CHECK-X86_32: }
//
-// CHECK-X86_64: define void @t0()
+// CHECK-X86_64-LABEL: define void @t0()
// CHECK-X86_64: call float bitcast {{.*}} @objc_msgSend to
// CHECK-X86_64: call double bitcast {{.*}} @objc_msgSend to
// CHECK-X86_64: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
// CHECK-X86_64: }
//
-// CHECK-ARMV7: define void @t0()
+// CHECK-ARMV7-LABEL: define void @t0()
// CHECK-ARMV7: call float bitcast {{.*}} @objc_msgSend to
// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
extern id test0_helper(void);
__attribute__((objc_precise_lifetime)) id x = test0_helper();
test0_helper();
- // CHECK: define void @test0()
+ // CHECK-LABEL: define void @test0()
// CHECK: [[T0:%.*]] = call i8* @test0_helper()
// CHECK-NEXT: store i8* [[T0]], i8** [[X:%.*]], align 8
// CHECK-NEXT: call i8* @test0_helper()
return ptr;
}
-// CHECK: define i8* @variant_load_1(i32 %i)
+// CHECK-LABEL: define i8* @variant_load_1(i32 %i)
// CHECK: [[IVAR:%.*]] = load i64* @"OBJC_IVAR_$_Derived.member"{{$}}
@interface Container : Derived @end
}
@end
-// CHECK: define internal i8* @block_block_invoke
+// CHECK-LABEL: define internal i8* @block_block_invoke
// CHECK: load i64* @"OBJC_IVAR_$_ForBlock.foo"
id (^block)(ForBlock*) = ^(ForBlock* a) {
return a->foo;
id obj = [NSObject new];
[x isEqual : obj];
}
-// CHECK: define void @test0()
+// CHECK-LABEL: define void @test0()
// CHECK: [[FIVE:%.*]] = call i8* @objc_retain
// CHECK-NEXT: [[SIX:%.*]] = bitcast
// CHECK-NEXT: [[SEVEN:%.*]] = icmp eq i8* [[SIX]], null
__weak id weakObj = obj;
_Complex float result = [x asComplexWithArg: obj];
}
-// CHECK: define void @test1()
+// CHECK-LABEL: define void @test1()
// CHECK: [[OBJ:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[WEAKOBJ:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[RESULT:%.*]] = alloca { float, float }, align 4
// RUN: %clang_cc1 -fobjc-dispatch-method=mixed -triple i386-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_NEW_DISPATCH %s
//
-// CHECK_NEW_DISPATCH: define void @f0
+// CHECK_NEW_DISPATCH-LABEL: define void @f0
// CHECK_NEW_DISPATCH: bitcast {{.*}}objc_msgSend_fixup_alloc
-// CHECK_NEW_DISPATCH: define void @f1
+// CHECK_NEW_DISPATCH-LABEL: define void @f1
// CHECK_NEW_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
//
// RUN: %clang_cc1 -fobjc-dispatch-method=legacy -emit-llvm -o - %s | FileCheck -check-prefix=CHECK_OLD_DISPATCH %s
//
-// CHECK_OLD_DISPATCH: define void @f0
+// CHECK_OLD_DISPATCH-LABEL: define void @f0
// CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
-// CHECK_OLD_DISPATCH: define void @f1
+// CHECK_OLD_DISPATCH-LABEL: define void @f1
// CHECK_OLD_DISPATCH: load {{.*}}OBJC_SELECTOR_REFERENCES
@interface A
void test0(void) {
[Test0 test];
}
-// CHECK: define void @test0()
+// CHECK-LABEL: define void @test0()
// CHECK: [[T0:%.*]] = call i8* (i8*, i8*, ...)* (i8*, i8*)* @objc_msg_lookup(i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* (i8*, i8*, ...)* [[T0]] to void (i8*, i8*)*
// CHECK-NEXT: call void [[T1]](i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
@end
// Test that compound operations only compute the base once.
-// CHECK: define void @test2
+// CHECK-LABEL: define void @test2
A *test2_helper(void);
void test2() {
// CHECK: [[BASE:%.*]] = call [[A:%.*]]* @test2_helper()
@interface Test4 {}
@property float f;
@end
-// CHECK: define void @test4
+// CHECK-LABEL: define void @test4
void test4(Test4 *t) {
extern int test4_printf(const char *, ...);
// CHECK: [[TMP:%.*]] = call float {{.*}} @objc_msgSend
@interface NSString : NSObject
@end
-// CHECK: define void @test1()
+// CHECK-LABEL: define void @test1()
void test1() {
// CHECK: {{call.*@objc_msgSend}}
// CHECK: {{call.*@objc_msgSend}}
NSString *str1 = [[[NSString alloc] init] retain];
}
-// CHECK: define void @test2()
+// CHECK-LABEL: define void @test2()
void test2() {
// CHECK: {{call.*@objc_msgSend}}
// CHECK: {{call.*@objc_msgSend}}
(void)t;
}
-// HASSTRET: define void @test0()
+// HASSTRET-LABEL: define void @test0()
// HASSTRET: [[T0:%.*]] = call i8* (i8*, i8*, ...)* (i8*, i8*)* @objc_msg_lookup_stret(i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
// HASSTRET-NEXT: [[T1:%.*]] = bitcast i8* (i8*, i8*, ...)* [[T0]] to void (%struct.test*, i8*, i8*)*
// HASSTRET-NEXT: call void [[T1]](%struct.test* sret {{.*}}, i8* bitcast (i64* @_OBJC_CLASS_Test0 to i8*),
-// NOSTRET: define void @test0()
+// NOSTRET-LABEL: define void @test0()
// NOSTRET: [[T0:%.*]] = call i8* (i8*, i8*, ...)* (i8*, i8*)* @objc_msg_lookup(i8*
// NOSTRET-NEXT: [[T1:%.*]] = bitcast i8* (i8*, i8*, ...)* [[T0]] to void (%struct.test*, i8*, i8*)*
// NOSTRET-NEXT: call void [[T1]](%struct.test* sret {{.*}}, i8* {{.*}}, i8* bitcast ([2 x { i8*, i8* }]*
@end
-// CHECK: define void @foo(
+// CHECK-LABEL: define void @foo(
void foo(id a) {
// CHECK: [[A:%.*]] = alloca i8*
// CHECK: [[SYNC:%.*]] = alloca i8*
}
-// CHECK: define i32 @f0(
+// CHECK-LABEL: define i32 @f0(
int f0(id a) {
// TODO: we can optimize the ret to a constant if we can figure out
// either that x isn't stored to within the synchronized block or
return x;
}
-// CHECK: define void @f1(
+// CHECK-LABEL: define void @f1(
void f1(id a) {
// Check that the return doesn't go through the cleanup.
extern void opaque(void);
// CHECK: @__CFConstantStringClassReference = common global [24 x i32] zeroinitializer, align 16
// CHECK: @_unnamed_cfstring_{{.*}} = private constant %struct.NSConstantString { i32* getelementptr inbounds ([24 x i32]* @__CFConstantStringClassReference, i32 0, i32 0)
-// CHECK: define internal void @_inlineFunction()
+// CHECK-LABEL: define internal void @_inlineFunction()
// CHECK: [[ZERO:%.*]] = load %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_
// CHECK-NEXT: [[ONE:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_"
// CHECK-NEXT: [[TWO:%.*]] = bitcast %struct._class_t* [[ZERO]] to i8*
void *ptr __attribute__((cleanup(destroy)));
test0_helper();
- // CHECK-WITH: define void @test0()
+ // CHECK-WITH-LABEL: define void @test0()
// CHECK-WITH: [[PTR:%.*]] = alloca i8*,
// CHECK-WITH: call void @destroy(i8** [[PTR]])
// CHECK-WITH-NEXT: ret void
// CHECK-WITH-NEXT: catch i8* null
// CHECK-WITH-NEXT: call void @objc_terminate()
- // CHECK-WITHOUT: define void @test0()
+ // CHECK-WITHOUT-LABEL: define void @test0()
// CHECK-WITHOUT: [[PTR:%.*]] = alloca i8*,
// CHECK-WITHOUT: call void @destroy(i8** [[PTR]])
// CHECK-WITHOUT-NEXT: ret void
struct Coerce coerce_func(void);
-// CHECK: define void @Coerce_test()
+// CHECK-LABEL: define void @Coerce_test()
void Coerce_test(void) {
struct Coerce c;
struct Indirect indirect_func(void);
-// CHECK: define void @Indirect_test()
+// CHECK-LABEL: define void @Indirect_test()
void Indirect_test(void) {
struct Indirect i;
id makeObject2() __attribute__((ns_returns_retained));
void releaseObject(__attribute__((ns_consumed)) id);
-// CHECK: define void @_Z10sanityTestv
+// CHECK-LABEL: define void @_Z10sanityTestv
void sanityTest() {
// CHECK: [[X:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[OBJ1:%.*]] = call i8* @_Z11makeObject1v()
template <typename T>
void releaseObjectT(__attribute__((ns_consumed)) T);
-// CHECK: define void @_Z12templateTestv
+// CHECK-LABEL: define void @_Z12templateTestv
void templateTest() {
// CHECK: [[X:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[OBJ1:%.*]] = call i8* @_Z12makeObjectT1IU8__strongP11objc_objectET_v()
void foo() {
__block A v;
}
- // CHECK: define void @_ZN5test03fooEv()
+ // CHECK-LABEL: define void @_ZN5test03fooEv()
// CHECK: [[V:%.*]] = alloca [[BYREF_A:%.*]], align 8
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_A]]* [[V]], i32 0, i32 4
// CHECK-NEXT: store i8* bitcast (void (i8*, i8*)* [[COPY_HELPER:@.*]] to i8*), i8** [[T0]]
} @catch (Ety *e) {
}
}
-// CHECK: define void @_Z5test0v()
+// CHECK-LABEL: define void @_Z5test0v()
// CHECK: [[E:%.*]] = alloca [[ETY:%.*]]*, align 8
// CHECK-NEXT: invoke void @_Z12test0_helperv()
// CHECK: [[T0:%.*]] = call i8* @objc_begin_catch(
} @catch (__weak Ety *e) {
}
}
-// CHECK: define void @_Z5test1v()
+// CHECK-LABEL: define void @_Z5test1v()
// CHECK: [[E:%.*]] = alloca [[ETY:%.*]]*, align 8
// CHECK-NEXT: invoke void @_Z12test1_helperv()
// CHECK: [[T0:%.*]] = call i8* @objc_begin_catch(
} catch (Ety *e) {
}
}
-// CHECK: define void @_Z5test2v()
+// CHECK-LABEL: define void @_Z5test2v()
// CHECK: [[E:%.*]] = alloca [[ETY:%.*]]*, align 8
// CHECK-NEXT: invoke void @_Z12test2_helperv()
// CHECK: [[T0:%.*]] = call i8* @__cxa_begin_catch(
} catch (Ety * __weak e) {
}
}
-// CHECK: define void @_Z5test3v()
+// CHECK-LABEL: define void @_Z5test3v()
// CHECK: [[E:%.*]] = alloca [[ETY:%.*]]*, align 8
// CHECK-NEXT: invoke void @_Z12test3_helperv()
// CHECK: [[T0:%.*]] = call i8* @__cxa_begin_catch(
A::A() {
throw 0;
}
- // CHECK: define void @_ZN5test41AC2Ev(
+ // CHECK-LABEL: define void @_ZN5test41AC2Ev(
// CHECK: [[THIS:%.*]] = load [[A:%.*]]** {{%.*}}
// Construct single.
// CHECK-NEXT: [[SINGLE:%.*]] = getelementptr inbounds [[A]]* [[THIS]], i32 0, i32 0
// autorelease pool.
id getObject();
-// CHECK: define internal void @__cxx_global_var_init
+// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: call i8* @_Z9getObjectv
// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
// CHECK-NEXT: {{store i8*.*@global_obj}}
// CHECK-NEXT: ret void
id global_obj = getObject();
-// CHECK: define internal void @__cxx_global_var_init
+// CHECK-LABEL: define internal void @__cxx_global_var_init
// CHECK: call i8* @_Z9getObjectv
// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
// CHECK-NEXT: {{store i8*.*@global_obj2}}
// CHECK-NEXT: ret void
id global_obj2 = getObject();
-// CHECK: define internal void @_GLOBAL__I_a
+// CHECK-LABEL: define internal void @_GLOBAL__I_a
// CHECK: call i8* @objc_autoreleasePoolPush()
// CHECK-NEXT: call void @__cxx_global_var_init
// CHECK-NEXT: call void @__cxx_global_var_init1
// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -emit-llvm -o - %s | FileCheck %s
-// CHECK: define void @_Z1fPU8__strongP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPU8__strongP11objc_object(i8**)
void f(__strong id *) {}
-// CHECK: define void @_Z1fPU6__weakP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPU6__weakP11objc_object(i8**)
void f(__weak id *) {}
-// CHECK: define void @_Z1fPU15__autoreleasingP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPU15__autoreleasingP11objc_object(i8**)
void f(__autoreleasing id *) {}
-// CHECK: define void @_Z1fPP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPP11objc_object(i8**)
void f(__unsafe_unretained id *) {}
-// CHECK: define void @_Z1fPKU8__strongP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPKU8__strongP11objc_object(i8**)
void f(const __strong id *) {}
-// CHECK: define void @_Z1fPKU6__weakP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPKU6__weakP11objc_object(i8**)
void f(const __weak id *) {}
-// CHECK: define void @_Z1fPKU15__autoreleasingP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPKU15__autoreleasingP11objc_object(i8**)
void f(const __autoreleasing id *) {}
-// CHECK: define void @_Z1fPKP11objc_object(i8**)
+// CHECK-LABEL: define void @_Z1fPKP11objc_object(i8**)
void f(const __unsafe_unretained id *) {}
template<unsigned N> struct unsigned_c { };
-// CHECK: define weak_odr void @_Z1gIKvEvP10unsigned_cIXplszv1U8__bridgecvPT_v1U8__bridgecvP11objc_objectcvS3_Li0ELi1EEE
+// CHECK-LABEL: define weak_odr void @_Z1gIKvEvP10unsigned_cIXplszv1U8__bridgecvPT_v1U8__bridgecvP11objc_objectcvS3_Li0ELi1EEE
template<typename T>void g(unsigned_c<sizeof((__bridge T*)(__bridge id)(T*)0) + 1>*) {}
template void g<const void>(unsigned_c<sizeof(id) + 1> *);
return static_cast<typename remove_reference<T>::type&&>(x);
}
-// CHECK: define void @_Z12library_moveRU8__strongP11objc_objectS2_
+// CHECK-LABEL: define void @_Z12library_moveRU8__strongP11objc_objectS2_
void library_move(__strong id &x, __strong id &y) {
// CHECK: call i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
// CHECK: load i8**
x = move(y);
}
-// CHECK: define void @_Z12library_moveRU8__strongP11objc_object
+// CHECK-LABEL: define void @_Z12library_moveRU8__strongP11objc_object
void library_move(__strong id &y) {
// CHECK: [[Y:%[a-zA-Z0-9]+]] = call i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
// Load the object
// CHECK-NEXT: ret void
}
-// CHECK: define void @_Z10const_moveRKU8__strongP11objc_object(
+// CHECK-LABEL: define void @_Z10const_moveRKU8__strongP11objc_object(
void const_move(const __strong id &x) {
// CHECK: [[Y:%.*]] = alloca i8*,
// CHECK: [[X:%.*]] = call i8** @_Z4moveIRKU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_(
typedef __strong id strong_id;
typedef __weak id weak_id;
-// CHECK: define void @_Z8test_newP11objc_object
+// CHECK-LABEL: define void @_Z8test_newP11objc_object
void test_new(id invalue) {
// CHECK: [[INVALUEADDR:%.*]] = alloca i8*
// CHECK-NEXT: store i8* null, i8** [[INVALUEADDR]]
// CHECK: ret void
}
-// CHECK: define void @_Z14test_array_new
+// CHECK-LABEL: define void @_Z14test_array_new
void test_array_new() {
// CHECK: call noalias i8* @_Znam
// CHECK: store i64 17, i64*
// CHECK: ret void
}
-// CHECK: define void @_Z11test_deletePU8__strongP11objc_objectPU6__weakS0_
+// CHECK-LABEL: define void @_Z11test_deletePU8__strongP11objc_objectPU6__weakS0_
void test_delete(__strong id *sptr, __weak id *wptr) {
// CHECK: br i1
// CHECK: load i8**
// CHECK: ret void
}
-// CHECK: define void @_Z17test_array_deletePU8__strongP11objc_objectPU6__weakS0_
+// CHECK-LABEL: define void @_Z17test_array_deletePU8__strongP11objc_objectPU6__weakS0_
void test_array_delete(__strong id *sptr, __weak id *wptr) {
// CHECK: icmp eq i8** [[BEGIN:%.*]], null
// CHECK: [[LEN:%.*]] = load i64* {{%.*}}
// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -fblocks -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s | FileCheck %s
-// CHECK: define void @_Z28test_objc_object_pseudo_dtorPU8__strongP11objc_objectPU6__weakS0_
+// CHECK-LABEL: define void @_Z28test_objc_object_pseudo_dtorPU8__strongP11objc_objectPU6__weakS0_
void test_objc_object_pseudo_dtor(__strong id *ptr, __weak id *wptr) {
// CHECK: load i8***
// CHECK-NEXT: load i8**
void callee();
// Lifetime extension for binding a reference to an rvalue
-// CHECK: define void @_Z5test0v()
+// CHECK-LABEL: define void @_Z5test0v()
void test0() {
// CHECK: call i8* @_Z9getObjectv
// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
}
// No lifetime extension when we're binding a reference to an lvalue.
-// CHECK: define void @_Z5test1RU8__strongP11objc_objectRU6__weakS0_
+// CHECK-LABEL: define void @_Z5test1RU8__strongP11objc_objectRU6__weakS0_
void test1(__strong id &x, __weak id &y) {
// CHECK-NOT: release
const __strong id &ref1 = x;
// CHECK-NEXT: ret void
}
-// CHECK: define void @_Z5test4RU8__strongP11objc_object
+// CHECK-LABEL: define void @_Z5test4RU8__strongP11objc_object
void test4(__strong id &x) {
// CHECK: call i8* @objc_retain
__strong A* const &ar = x;
void sink(__strong A* &&);
-// CHECK: define void @_Z5test5RU8__strongP11objc_object
+// CHECK-LABEL: define void @_Z5test5RU8__strongP11objc_object
void test5(__strong id &x) {
// CHECK: [[REFTMP:%.*]] = alloca {{%.*}}*, align 8
// CHECK: [[OBJ_ID:%.*]] = call i8* @objc_retain(
// CHECK-NEXT: ret void
}
-// CHECK: define internal void @__cxx_global_var_init(
+// CHECK-LABEL: define internal void @__cxx_global_var_init(
// CHECK: call i8* @_Z9getObjectv
// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
const __strong id &global_ref = getObject();
int (^bp)(int);
};
-// CHECK: define void @_Z42test_ObjCMember_default_construct_destructv(
+// CHECK-LABEL: define void @_Z42test_ObjCMember_default_construct_destructv(
void test_ObjCMember_default_construct_destruct() {
// CHECK: call void @_ZN10ObjCMemberC1Ev
// CHECK: call void @_ZN10ObjCMemberD1Ev
ObjCMember m1;
}
-// CHECK: define void @_Z39test_ObjCMember_copy_construct_destruct10ObjCMember
+// CHECK-LABEL: define void @_Z39test_ObjCMember_copy_construct_destruct10ObjCMember
void test_ObjCMember_copy_construct_destruct(ObjCMember m1) {
// CHECK: call void @_ZN10ObjCMemberC1ERKS_
// CHECK: call void @_ZN10ObjCMemberD1Ev
// CHECK: ret void
}
-// CHECK: define void @_Z27test_ObjCMember_copy_assign10ObjCMemberS_
+// CHECK-LABEL: define void @_Z27test_ObjCMember_copy_assign10ObjCMemberS_
void test_ObjCMember_copy_assign(ObjCMember m1, ObjCMember m2) {
// CHECK: {{call.*_ZN10ObjCMemberaSERKS_}}
m1 = m2;
// CHECK: call void @objc_storeStrong
// CHECK: ret
-// CHECK: define void @_Z47test_ObjCArrayMember_default_construct_destructv
+// CHECK-LABEL: define void @_Z47test_ObjCArrayMember_default_construct_destructv
void test_ObjCArrayMember_default_construct_destruct() {
// CHECK: call void @_ZN15ObjCArrayMemberC1Ev
ObjCArrayMember m1;
// CHECK: ret void
}
-// CHECK: define void @_Z44test_ObjCArrayMember_copy_construct_destruct15ObjCArrayMember
+// CHECK-LABEL: define void @_Z44test_ObjCArrayMember_copy_construct_destruct15ObjCArrayMember
void test_ObjCArrayMember_copy_construct_destruct(ObjCArrayMember m1) {
// CHECK: call void @_ZN15ObjCArrayMemberC1ERKS_
ObjCArrayMember m2 = m1;
// CHECK-NEXT: br label
// CHECK: ret
-// CHECK: define void @_Z47test_ObjCBlockMember_default_construct_destructv
+// CHECK-LABEL: define void @_Z47test_ObjCBlockMember_default_construct_destructv
void test_ObjCBlockMember_default_construct_destruct() {
// CHECK: call void @_ZN15ObjCBlockMemberC1Ev
ObjCBlockMember m;
// CHECK-NEXT: ret void
}
-// CHECK: define void @_Z44test_ObjCBlockMember_copy_construct_destruct15ObjCBlockMember
+// CHECK-LABEL: define void @_Z44test_ObjCBlockMember_copy_construct_destruct15ObjCBlockMember
void test_ObjCBlockMember_copy_construct_destruct(ObjCBlockMember m1) {
// CHECK: call void @_ZN15ObjCBlockMemberC1ERKS_
ObjCBlockMember m2 = m1;
// CHECK-NEXT: ret void
}
-// CHECK: define void @_Z32test_ObjCBlockMember_copy_assign15ObjCBlockMemberS_
+// CHECK-LABEL: define void @_Z32test_ObjCBlockMember_copy_assign15ObjCBlockMemberS_
void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
// CHECK: {{call.*_ZN15ObjCBlockMemberaSERKS_}}
m1 = m2;
// CHECK-NEXT: ret
// Implicitly-generated copy constructor for ObjCBlockMember
-// CHECK: define linkonce_odr void @_ZN15ObjCBlockMemberC2ERKS_
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberC2ERKS_
// CHECK: call i8* @objc_retainBlock
// CHECK: ret
// Implicitly-generated destructor for ObjCBlockMember
-// CHECK: define linkonce_odr void @_ZN15ObjCBlockMemberD2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberD2Ev
// CHECK: call void @objc_storeStrong(i8*
// CHECK: ret
// Implicitly-generated default constructor for ObjCBlockMember
-// CHECK: define linkonce_odr void @_ZN15ObjCBlockMemberC2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCBlockMemberC2Ev
// CHECK: store {{.*}} null,
// CHECK-NEXT: ret void
// Implicitly-generated copy constructor for ObjCArrayMember
-// CHECK: define linkonce_odr void @_ZN15ObjCArrayMemberC2ERKS_
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberC2ERKS_
// CHECK: br i1
// CHECK: call i8* @objc_retain
// CHECK-NEXT: store i8*
// CHECK: ret
// Implicitly-generated destructor for ObjCArrayMember
-// CHECK: define linkonce_odr void @_ZN15ObjCArrayMemberD2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberD2Ev
// CHECK: [[BEGIN:%.*]] = getelementptr inbounds [2 x [3 x i8*]]*
// CHECK-NEXT: [[END:%.*]] = getelementptr inbounds i8** [[BEGIN]], i64 6
// CHECK-NEXT: br label
// CHECK: ret void
// Implicitly-generated default constructor for ObjCArrayMember
-// CHECK: define linkonce_odr void @_ZN15ObjCArrayMemberC2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN15ObjCArrayMemberC2Ev
// CHECK: call void @llvm.memset.p0i8.i64
// CHECK: ret
// Implicitly-generated copy constructor for ObjCMember
-// CHECK: define linkonce_odr void @_ZN10ObjCMemberC2ERKS_
+// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberC2ERKS_
// CHECK-NOT: objc_release
// CHECK: call i8* @objc_retain
// CHECK-NEXT: store i8*
// CHECK-NEXT: ret void
// Implicitly-generated destructor for ObjCMember
-// CHECK: define linkonce_odr void @_ZN10ObjCMemberD2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberD2Ev
// CHECK: call void @objc_storeStrong
// CHECK: ret void
// Implicitly-generated default constructor for ObjCMember
-// CHECK: define linkonce_odr void @_ZN10ObjCMemberC2Ev
+// CHECK-LABEL: define linkonce_odr void @_ZN10ObjCMemberC2Ev
// CHECK-NOT: objc_release
// CHECK: store i8* null
// CHECK-NEXT: ret void
test34_sink(cond ? &strong : 0);
test34_sink(cond ? &weak : 0);
- // CHECK: define void @_Z6test34i(
+ // CHECK-LABEL: define void @_Z6test34i(
// CHECK: [[COND:%.*]] = alloca i32
// CHECK-NEXT: [[STRONG:%.*]] = alloca i8*
// CHECK-NEXT: [[WEAK:%.*]] = alloca i8*
id makeObject4();
};
-// CHECK: define void @_Z6test3513Test35_HelperPS_
+// CHECK-LABEL: define void @_Z6test3513Test35_HelperPS_
void test35(Test35_Helper x0, Test35_Helper *x0p) {
// CHECK: call i8* @_ZN13Test35_Helper11makeObject1Ev
// CHECK-NOT: call i8* @objc_retain
// CHECK-NEXT: ret void
}
-// CHECK: define void @_Z7test35b13Test35_HelperPS_
+// CHECK-LABEL: define void @_Z7test35b13Test35_HelperPS_
void test35b(Test35_Helper x0, Test35_Helper *x0p) {
// CHECK: call i8* @_ZN13Test35_Helper11makeObject3Ev
// CHECK: call i8* @objc_retain
}
// rdar://problem/9603128
-// CHECK: define i8* @_Z6test36P11objc_object(
+// CHECK-LABEL: define i8* @_Z6test36P11objc_object(
id test36(id z) {
// CHECK: objc_retain
// CHECK: objc_retain
}
extern template void test37<Test37>(Test37 *a);
template void test37<Test37>(Test37 *a);
-// CHECK: define weak_odr void @_Z6test37I6Test37EvPT_(
+// CHECK-LABEL: define weak_odr void @_Z6test37I6Test37EvPT_(
// CHECK: [[T0:%.*]] = call [[NSARRAY]]* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to [[NSARRAY]]* (i8*, i8*)*)(
// CHECK-NEXT: [[T1:%.*]] = bitcast [[NSARRAY]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
[Test37 array];
}
-// CHECK: define weak_odr void @_Z12send_releaseIiEvv(
+// CHECK-LABEL: define weak_odr void @_Z12send_releaseIiEvv(
// CHECK: call %0* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: bitcast
// CHECK-NEXT: call i8* @objc_retainAutoreleasedReturnValue
return result;
}
-// CHECK: define weak_odr %2* @_Z16instantiate_initIiEP6Test37v
+// CHECK-LABEL: define weak_odr %2* @_Z16instantiate_initIiEP6Test37v
// CHECK: call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: call i8* @objc_retain
^{ (void) x; }, ({ x; });
}
};
-// CHECK: define weak_odr void @_ZN6Test38IiE4testEi(
+// CHECK-LABEL: define weak_odr void @_ZN6Test38IiE4testEi(
template class Test38<int>;
// rdar://problem/11964832
};
id Test39::bar() { return 0; }
// Note lack of autorelease.
-// CHECK: define i8* @_ZThn8_N6Test393barEv(
+// CHECK-LABEL: define i8* @_ZThn8_N6Test393barEv(
// CHECK: call i8* @_ZN6Test393barEv(
// CHECK-NEXT: ret i8*
[Test40 foo: &x];
};
template void test40_helper<int>();
-// CHECK: define weak_odr void @_Z13test40_helperIiEvv()
+// CHECK-LABEL: define weak_odr void @_Z13test40_helperIiEvv()
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[TEMP:%.*]] = alloca i8*
// CHECK-NEXT: store i8* null, i8** [[X]]
foo();
}
}
-// CHECK: define void @_Z5test0P11objc_object(
+// CHECK-LABEL: define void @_Z5test0P11objc_object(
// Enter the @synchronized block.
// CHECK: call i32 @objc_sync_enter(i8* [[OBJ:%.*]])
// CHECK: call void @objc_exception_try_enter([[BUF_T:%.*]]* [[BUF:%.*]])
*failed = true;
}
}
-// CHECK: define void @_Z5test1P11objc_objectPb(
+// CHECK-LABEL: define void @_Z5test1P11objc_objectPb(
// Enter the @try block.
// CHECK: call void @objc_exception_try_enter([[BUF_T]]* [[BUF:%.*]])
// CHECK-NEXT: [[T0:%.*]] = getelementptr [[BUF_T]]* [[BUF]], i32 0, i32 0, i32 0
namespace test0 {
- // CHECK: define void @_ZN5test03fooEv
+ // CHECK-LABEL: define void @_ZN5test03fooEv
void foo() {
try {
// CHECK: invoke void @_Z6opaquev
};
A::A() : x(test0::x) {}
-// CHECK: define void @_ZN5test01AC2Ev(
+// CHECK-LABEL: define void @_ZN5test01AC2Ev(
// CHECK: [[THIS:%.*]] = alloca [[TEST0:%.*]]*, align 8
// CHECK-NEXT: store
// CHECK-NEXT: [[T0:%.*]] = load [[TEST0]]** [[THIS]]
d1 = d2;
}
-// CHECK-OBJ: define linkonce_odr %struct.D* @_ZN1DaSERS_
+// CHECK-OBJ-LABEL: define linkonce_odr %struct.D* @_ZN1DaSERS_
// CHECK-OBJ: {{call.*_ZN1AaSERS_}}
// CHECK-OBJ: {{call.*_ZN1BaSERS_}}
// CHECK-OBJ: {{call.*_ZN1CaSERKS_}}
D d2(d);
}
-// CHECK: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
// CHECK: call void @_ZN1AC1Ev
// CHECK: call void @_ZN1CC2ERS_1A
// CHECK: call void @_ZN1AD1Ev
// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = internal global [5 x i8] c"copy\00"
// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = internal global [12 x i8] c"autorelease\00"
-// MRC: define i32 ()* @_Z1fv(
-// MRC: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
+// MRC-LABEL: define i32 ()* @_Z1fv(
+// MRC-LABEL: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
// MRC: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*)
// MRC: store i8* bitcast (i32 (i8*)* @"___ZZ1fvENK3$_0cvU13block_pointerFivEEv_block_invoke" to i8*)
// MRC: call i32 ()* (i8*, i8*)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 ()* (i8*, i8*)*)
// MRC: call i32 ()* (i8*, i8*)* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i32 ()* (i8*, i8*)*)
// MRC: ret i32 ()*
-// ARC: define i32 ()* @_Z1fv(
-// ARC: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
+// ARC-LABEL: define i32 ()* @_Z1fv(
+// ARC-LABEL: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
// ARC: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*)
// ARC: store i8* bitcast (i32 (i8*)* @"___ZZ1fvENK3$_0cvU13block_pointerFivEEv_block_invoke" to i8*)
// ARC: call i8* @objc_retainBlock
// ARC: store i8* bitcast (i32 (i8*)* @___Z2f2v_block_invoke to i8*),
// ARC: call i8* @objc_retainBlock
// ARC: call void @objc_release
-// ARC: define internal i32 @___Z2f2v_block_invoke
+// ARC-LABEL: define internal i32 @___Z2f2v_block_invoke
// ARC: call i32 @"_ZZ2f2vENK3$_1clEv
template <class T> void take_lambda(T &&lambda) { lambda(); }
@end
// Check lines for BlockInLambda test below
-// ARC: define internal i32 @___ZZN13BlockInLambda1X1fEvENKUlvE_clEv_block_invoke
+// ARC-LABEL: define internal i32 @___ZZN13BlockInLambda1X1fEvENKUlvE_clEv_block_invoke
// ARC: [[Y:%.*]] = getelementptr inbounds %"struct.BlockInLambda::X"* {{.*}}, i32 0, i32 1
// ARC-NEXT: [[YVAL:%.*]] = load i32* [[Y]], align 4
// ARC-NEXT: ret i32 [[YVAL]]
template<typename T>
fptr StaticMembers<T>::f = [] { auto f = []{return 5;}; return fptr(f); }();
template fptr StaticMembers<float>::f;
-// ARC: define linkonce_odr i32 ()* @_ZZNK13StaticMembersIfE1fMUlvE_clEvENKUlvE_cvU13block_pointerFivEEv
+// ARC-LABEL: define linkonce_odr i32 ()* @_ZZNK13StaticMembersIfE1fMUlvE_clEvENKUlvE_cvU13block_pointerFivEEv
namespace BlockInLambda {
struct X {
operator id() const;
};
-// CHECK: define void @_Z10test_arrayv
+// CHECK-LABEL: define void @_Z10test_arrayv
void test_array() {
// CHECK: [[OBJECTS:%[a-zA-Z0-9.]+]] = alloca [2 x i8*]
// CHECK: unreachable
}
-// CHECK: define weak_odr void @_Z24test_array_instantiationIiEvv
+// CHECK-LABEL: define weak_odr void @_Z24test_array_instantiationIiEvv
template<typename T>
void test_array_instantiation() {
// CHECK: [[OBJECTS:%[a-zA-Z0-9.]+]] = alloca [2 x i8*]
int f();
void foo() {
- // CHECK: define internal i32 @___Z3foov_block_invoke
+ // CHECK-LABEL: define internal i32 @___Z3foov_block_invoke
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZZ3foovEUb_E5value
(void)^(int x) {
static int value = f();
};
}
-// CHECK: define internal i32 @i_block_invoke
+// CHECK-LABEL: define internal i32 @i_block_invoke
int i = ^(int x) { return x;}(i);
@interface A
}
namespace N {
- // CHECK: define internal signext i8 @___Z3fooi_block_invoke
+ // CHECK-LABEL: define internal signext i8 @___Z3fooi_block_invoke
void bar() {
(void)^(int x) {
// CHECK: @_ZZZN1N3barEvEUb2_E4name
@protocol P;
void overload1(A<P>*) {}
-// CHECK: define void @_Z9overload1PU11objcproto1P1A
+// CHECK-LABEL: define void @_Z9overload1PU11objcproto1P1A
void overload1(const A<P>*) {}
-// CHECK: define void @_Z9overload1PKU11objcproto1P1A
+// CHECK-LABEL: define void @_Z9overload1PKU11objcproto1P1A
void overload1(A<P>**) {}
-// CHECK: define void @_Z9overload1PPU11objcproto1P1A
+// CHECK-LABEL: define void @_Z9overload1PPU11objcproto1P1A
void overload1(A<P>*const*) {}
-// CHECK: define void @_Z9overload1PKPU11objcproto1P1A
+// CHECK-LABEL: define void @_Z9overload1PKPU11objcproto1P1A
void overload1(A<P>***) {}
-// CHECK: define void @_Z9overload1PPPU11objcproto1P1A
+// CHECK-LABEL: define void @_Z9overload1PPPU11objcproto1P1A
void overload1(void (f)(A<P>*)) {}
-// CHECK: define void @_Z9overload1PFvPU11objcproto1P1AE
+// CHECK-LABEL: define void @_Z9overload1PFvPU11objcproto1P1AE
template<typename T> struct X { void f(); };
template<> void X<A*>::f() {}
-// CHECK: define void @_ZN1XIP1AE1fEv
+// CHECK-LABEL: define void @_ZN1XIP1AE1fEv
template<> void X<A<P>*>::f() {}
-// CHECK: define void @_ZN1XIPU11objcproto1P1AE1fEv
+// CHECK-LABEL: define void @_ZN1XIPU11objcproto1P1AE1fEv
[a foo];
}
template void foo<int>();
- // CHECK: define weak_odr void @_ZN5test03fooIiEEvv()
+ // CHECK-LABEL: define weak_odr void @_ZN5test03fooIiEEvv()
// CHECK: [[T0:%.*]] = call [[TEST0:%.*]]* @_ZN5test01AcvP5Test0Ev(
// CHECK-NEXT: [[T1:%.*]] = load i8**
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST0]]* [[T0]] to i8*
X blocksNRVO() {
return ^{
- // CHECK: define internal void @___Z10blocksNRVOv_block_invoke
+ // CHECK-LABEL: define internal void @___Z10blocksNRVOv_block_invoke
X x;
// CHECK: tail call void @_ZN1XC1Ev
// CHECK-NEXT: ret void
a[10] = 0;
}
template void test2<int>(NSMutableArray*);
-// CHECK: define weak_odr void @_Z5test2IiEvP14NSMutableArray
+// CHECK-LABEL: define weak_odr void @_Z5test2IiEvP14NSMutableArray
// CHECK: @objc_msgSend
// CHECK: ret void
}
template void test3<int>(NSMutableArray*);
-// CHECK: define weak_odr void @_Z5test3IiEvP14NSMutableArray
+// CHECK-LABEL: define weak_odr void @_Z5test3IiEvP14NSMutableArray
// CHECK: @objc_msgSend
// CHECK: ret void
a[10] = 0;
}
template void test2<int>(NSMutableArray*);
-// CHECK: define weak_odr void @_Z5test2IiEvP14NSMutableArray
+// CHECK-LABEL: define weak_odr void @_Z5test2IiEvP14NSMutableArray
// CHECK: @objc_msgSend
// CHECK: ret void
}
template void test3<int>(NSMutableArray*);
-// CHECK: define weak_odr void @_Z5test3IiEvP14NSMutableArray
+// CHECK-LABEL: define weak_odr void @_Z5test3IiEvP14NSMutableArray
// CHECK: @objc_msgSend
// CHECK: ret void
-// CHECK: define void @_Z11static_dataP14NSMutableArray
+// CHECK-LABEL: define void @_Z11static_dataP14NSMutableArray
void static_data(NSMutableArray *array) {
// CHECK: call i32 @__cxa_guard_acquire
// CHECK: {{call i8*.*@objc_msgSend }}
void(obj.myProperty);
void(obj.myGetter);
}
-// CHECK: define void @_Z5test2v()
+// CHECK-LABEL: define void @_Z5test2v()
// CHECK: call i32 bitcast
// CHECK: call double bitcast
// CHECK: call i32 bitcast
@synthesize MyProperty1 = _cppObject1;
@end
-// CHECK: define internal void @__copy_helper_atomic_property_(
+// CHECK-LABEL: define internal void @__copy_helper_atomic_property_(
// CHECK: [[TWO:%.*]] = load %struct.TCPPObject** [[ADDR:%.*]], align 8
// CHECK: [[THREE:%.*]] = load %struct.TCPPObject** [[ADDR1:%.*]], align 8
// CHECK: [[CALL:%.*]] = call i32 @_Z7DEFAULTv()
// CHECK: call void @objc_copyCppObjectAtomic(i8* [[THREE]], i8* [[TWO]], i8* bitcast (void (%struct.TCPPObject*, %struct.TCPPObject*)* @__copy_helper_atomic_property_ to i8*))
// CHECK: ret void
-// CHECK: define internal void @__assign_helper_atomic_property_(
+// CHECK-LABEL: define internal void @__assign_helper_atomic_property_(
// CHECK: [[TWO:%.*]] = load %struct.TCPPObject** [[ADDR:%.*]], align 8
// CHECK: [[THREE:%.*]] = load %struct.TCPPObject** [[ADDR1:%.*]], align 8
// CHECK: [[CALL:%.*]] = call %struct.TCPPObject* @_ZN10TCPPObjectaSERKS_(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* [[THREE]])
@end
-// CHECK: define i32 @main
+// CHECK-LABEL: define i32 @main
// CHECK: call void @_ZN1SC1ERKS_(%class.S* [[AGGTMP:%[a-zA-Z0-9\.]+]], %class.S* {{%[a-zA-Z0-9\.]+}})
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %class.S*)*)(i8* {{%[a-zA-Z0-9\.]+}}, i8* {{%[a-zA-Z0-9\.]+}}, %class.S* [[AGGTMP]])
// CHECK-NEXT: ret i32 0
}
// rdar://8379892
-// CHECK: define void @_Z1fP1A
+// CHECK-LABEL: define void @_Z1fP1A
// CHECK: call void @_ZN1XC1Ev(%struct.X* [[LVTEMP:%[a-zA-Z0-9\.]+]])
// CHECK: call void @_ZN1XC1ERKS_(%struct.X* [[AGGTMP:%[a-zA-Z0-9\.]+]], %struct.X* [[LVTEMP]])
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.X*)*)({{.*}} %struct.X* [[AGGTMP]])
a.prop += x;
}
template void test2<int>(Test2*);
-// CHECK: define weak_odr void @_Z5test2IiEvP5Test2(
+// CHECK-LABEL: define weak_odr void @_Z5test2IiEvP5Test2(
// CHECK: [[X:%.*]] = alloca i32,
// CHECK: @objc_msgSend
// CHECK: store i32 {{%.*}}, i32* [[X]],
a.prop += (sizeof(T), x);
}
template void test3<int>(Test2*);
-// CHECK: define weak_odr void @_Z5test3IiEvP5Test2(
+// CHECK-LABEL: define weak_odr void @_Z5test3IiEvP5Test2(
// CHECK: [[X:%.*]] = alloca i32,
// CHECK: @objc_msgSend
// CHECK: store i32 {{%.*}}, i32* [[X]],
@end
-// CHECK: define void @_Z1fP1B
+// CHECK-LABEL: define void @_Z1fP1B
// CHECK: objc_msgSend to
// CHECK-NOT: call void @_ZN1AD1Ev
// CHECK: ret void
void test0(A *a) {
(void) [a test0: (float) 2.0];
}
-// CHECK: define void @_Z5test0P1A(
+// CHECK-LABEL: define void @_Z5test0P1A(
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, float)*)(
@interface B
void test1(B *b) {
(void) [b test1: (float) 2.0];
}
-// CHECK: define void @_Z5test1P1B(
+// CHECK-LABEL: define void @_Z5test1P1B(
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, float)*)(
++i;
}
-// CHECK: define void @_Z3barPU3AS2i
+// CHECK-LABEL: define void @_Z3barPU3AS2i
__kernel void __attribute__((__overloadable__)) bar(local int *x) {
*x = 5;
}
// CHECK: @fnc3(%opencl.image3d_t*
void fnc4smp(sampler_t s) {}
-// CHECK: define void @fnc4smp(i32
+// CHECK-LABEL: define void @fnc4smp(i32
kernel void foo(image1d_t img) {
sampler_t smp = 5;
void device_function() {
}
-// CHECK: define void @device_function()
+// CHECK-LABEL: define void @device_function()
__kernel void kernel_function() {
device_function();
}
-// CHECK: define void @kernel_function()
+// CHECK-LABEL: define void @kernel_function()
// CHECK: call void @device_function()
// CHECK: !{{[0-9]+}} = metadata !{void ()* @kernel_function, metadata !"kernel", i32 1}
void device_function() {
}
-// CHECK: define void @device_function()
+// CHECK-LABEL: define void @device_function()
__kernel void kernel_function() {
}
-// CHECK: define void @kernel_function()
+// CHECK-LABEL: define void @kernel_function()
// CHECK: !{{[0-9]+}} = metadata !{void ()* @kernel_function, metadata !"kernel", i32 1}