[clang] 0871337 - [XCore] Adapt Clang tests to opaque pointers.

Nigel Perks via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 16 08:32:55 PST 2023


Author: Nigel Perks
Date: 2023-02-16T16:32:29Z
New Revision: 0871337d97f71cac2dbc9cce33c0ecca3c5e5f9c

URL: https://github.com/llvm/llvm-project/commit/0871337d97f71cac2dbc9cce33c0ecca3c5e5f9c
DIFF: https://github.com/llvm/llvm-project/commit/0871337d97f71cac2dbc9cce33c0ecca3c5e5f9c.diff

LOG: [XCore] Adapt Clang tests to opaque pointers.

Differential Revision: https://reviews.llvm.org/D144195

Added: 
    

Modified: 
    clang/test/CodeGen/xcore-abi.c
    clang/test/CodeGen/xcore-stringtype.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/xcore-abi.c b/clang/test/CodeGen/xcore-abi.c
index 28fdae57de72..4dd0f221533b 100644
--- a/clang/test/CodeGen/xcore-abi.c
+++ b/clang/test/CodeGen/xcore-abi.c
@@ -1,12 +1,12 @@
 // REQUIRES: xcore-registered-target
-// RUN: %clang_cc1 -no-opaque-pointers -triple xcore -verify %s
+// RUN: %clang_cc1 -triple xcore -verify %s
 _Static_assert(sizeof(long long) == 8, "sizeof long long is wrong");
 _Static_assert(_Alignof(long long) == 4, "alignof long long is wrong");
 
 _Static_assert(sizeof(double) == 8, "sizeof double is wrong");
 _Static_assert(_Alignof(double) == 4, "alignof double is wrong");
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - %s | FileCheck %s
 
 // CHECK: target triple = "xcore-unknown-unknown"
 
@@ -25,91 +25,77 @@ void testva (int n, ...) {
   // CHECK-LABEL: testva
   va_list ap;
   va_start(ap,n);
-  // CHECK: [[AP:%[a-z0-9]+]] = alloca i8*, align 4
-  // CHECK: [[AP1:%[a-z0-9]+]] = bitcast i8** [[AP]] to i8*
-  // CHECK: call void @llvm.va_start(i8* [[AP1]])
+  // CHECK: [[AP:%[a-z0-9]+]] = alloca ptr, align 4
+  // CHECK: [[V5:%[a-z0-9]+]] = alloca %struct.x, align 4
+  // CHECK: [[TMP:%[a-z0-9]+]] = alloca [4 x i32], align 4
+  // CHECK: call void @llvm.va_start(ptr [[AP]])
 
   char* v1 = va_arg (ap, char*);
   f(v1);
-  // CHECK: [[I:%[a-z0-9]+]] = load i8*, i8** [[AP]]
-  // CHECK: [[P:%[a-z0-9]+]] = bitcast i8* [[I]] to i8**
-  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, i8* [[I]], i32 4
-  // CHECK: store i8* [[IN]], i8** [[AP]]
-  // CHECK: [[V1:%[a-z0-9]+]] = load i8*, i8** [[P]]
-  // CHECK: store i8* [[V1]], i8** [[V:%[a-z0-9]+]], align 4
-  // CHECK: [[V2:%[a-z0-9]+]] = load i8*, i8** [[V]], align 4
-  // CHECK: call void @f(i8* noundef [[V2]])
+  // CHECK: [[I:%[a-z0-9]+]] = load ptr, ptr [[AP]]
+  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, ptr [[I]], i32 4
+  // CHECK: store ptr [[IN]], ptr [[AP]]
+  // CHECK: [[V1:%[a-z0-9]+]] = load ptr, ptr [[I]]
+  // CHECK: store ptr [[V1]], ptr [[V:%[a-z0-9]+]], align 4
+  // CHECK: [[V2:%[a-z0-9]+]] = load ptr, ptr [[V]], align 4
+  // CHECK: call void @f(ptr noundef [[V2]])
 
   char v2 = va_arg (ap, char); // expected-warning{{second argument to 'va_arg' is of promotable type 'char'}}
   f(&v2);
-  // CHECK: [[I:%[a-z0-9]+]] = load i8*, i8** [[AP]]
-  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, i8* [[I]], i32 4
-  // CHECK: store i8* [[IN]], i8** [[AP]]
-  // CHECK: [[V1:%[a-z0-9]+]] = load i8, i8* [[I]]
-  // CHECK: store i8 [[V1]], i8* [[V:%[a-z0-9]+]], align 1
-  // CHECK: call void @f(i8* noundef [[V]])
+  // CHECK: [[I:%[a-z0-9]+]] = load ptr, ptr [[AP]]
+  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, ptr [[I]], i32 4
+  // CHECK: store ptr [[IN]], ptr [[AP]]
+  // CHECK: [[V1:%[a-z0-9]+]] = load i8, ptr [[I]]
+  // CHECK: store i8 [[V1]], ptr [[V:%[a-z0-9]+]], align 1
+  // CHECK: call void @f(ptr noundef [[V]])
 
   int v3 = va_arg (ap, int);
   f(&v3);
-  // CHECK: [[I:%[a-z0-9]+]] = load i8*, i8** [[AP]]
-  // CHECK: [[P:%[a-z0-9]+]] = bitcast i8* [[I]] to i32*
-  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, i8* [[I]], i32 4
-  // CHECK: store i8* [[IN]], i8** [[AP]]
-  // CHECK: [[V1:%[a-z0-9]+]] = load i32, i32* [[P]]
-  // CHECK: store i32 [[V1]], i32* [[V:%[a-z0-9]+]], align 4
-  // CHECK: [[V2:%[a-z0-9]+]] = bitcast i32* [[V]] to i8*
-  // CHECK: call void @f(i8* noundef [[V2]])
+  // CHECK: [[I:%[a-z0-9]+]] = load ptr, ptr [[AP]]
+  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, ptr [[I]], i32 4
+  // CHECK: store ptr [[IN]], ptr [[AP]]
+  // CHECK: [[V1:%[a-z0-9]+]] = load i32, ptr [[I]]
+  // CHECK: store i32 [[V1]], ptr [[V:%[a-z0-9]+]], align 4
+  // CHECK: call void @f(ptr noundef [[V]])
 
   long long int v4 = va_arg (ap, long long int);
   f(&v4);
-  // CHECK: [[I:%[a-z0-9]+]] = load i8*, i8** [[AP]]
-  // CHECK: [[P:%[a-z0-9]+]] = bitcast i8* [[I]] to i64*
-  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, i8* [[I]], i32 8
-  // CHECK: store i8* [[IN]], i8** [[AP]]
-  // CHECK: [[V1:%[a-z0-9]+]] = load i64, i64* [[P]]
-  // CHECK: store i64 [[V1]], i64* [[V:%[a-z0-9]+]], align 4
-  // CHECK:[[V2:%[a-z0-9]+]] = bitcast i64* [[V]] to i8*
-  // CHECK: call void @f(i8* noundef [[V2]])
+  // CHECK: [[I:%[a-z0-9]+]] = load ptr, ptr [[AP]]
+  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, ptr [[I]], i32 8
+  // CHECK: store ptr [[IN]], ptr [[AP]]
+  // CHECK: [[V1:%[a-z0-9]+]] = load i64, ptr [[I]]
+  // CHECK: store i64 [[V1]], ptr [[V:%[a-z0-9]+]], align 4
+  // CHECK: call void @f(ptr noundef [[V]])
 
   struct x v5 = va_arg (ap, struct x);  // typical aggregate type
   f(&v5);
-  // CHECK: [[I:%[a-z0-9]+]] = load i8*, i8** [[AP]]
-  // CHECK: [[I2:%[a-z0-9]+]] = bitcast i8* [[I]] to %struct.x**
-  // CHECK: [[P:%[a-z0-9]+]] = load %struct.x*, %struct.x** [[I2]]
-  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, i8* [[I]], i32 4
-  // CHECK: store i8* [[IN]], i8** [[AP]]
-  // CHECK: [[V1:%[a-z0-9]+]] = bitcast %struct.x* [[V:%[a-z0-9]+]] to i8*
-  // CHECK: [[P1:%[a-z0-9]+]] = bitcast %struct.x* [[P]] to i8*
-  // CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[V1]], i8* align 4 [[P1]], i32 20, i1 false)
-  // CHECK: [[V2:%[a-z0-9]+]] = bitcast %struct.x* [[V]] to i8*
-  // CHECK: call void @f(i8* noundef [[V2]])
+  // CHECK: [[I:%[a-z0-9]+]] = load ptr, ptr [[AP]]
+  // CHECK: [[P:%[a-z0-9]+]] = load ptr, ptr [[I]]
+  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, ptr [[I]], i32 4
+  // CHECK: store ptr [[IN]], ptr [[AP]]
+  // CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[V5]], ptr align 4 [[P]], i32 20, i1 false)
+  // CHECK: call void @f(ptr noundef [[V5]])
 
   int* v6 = va_arg (ap, int[4]);  // an unusual aggregate type
   f(v6);
-  // CHECK: [[I:%[a-z0-9]+]] = load i8*, i8** [[AP]]
-  // CHECK: [[I2:%[a-z0-9]+]] = bitcast i8* [[I]] to [4 x i32]**
-  // CHECK: [[P:%[a-z0-9]+]] = load [4 x i32]*, [4 x i32]** [[I2]]
-  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, i8* [[I]], i32 4
-  // CHECK: store i8* [[IN]], i8** [[AP]]
-  // CHECK: [[V1:%[a-z0-9]+]] = bitcast [4 x i32]* [[V0:%[a-z0-9]+]] to i8*
-  // CHECK: [[P1:%[a-z0-9]+]] = bitcast [4 x i32]* [[P]] to i8*
-  // CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[V1]], i8* align 4 [[P1]], i32 16, i1 false)
-  // CHECK: [[V2:%[a-z0-9]+]] = getelementptr inbounds [4 x i32], [4 x i32]* [[V0]], i32 0, i32 0
-  // CHECK: store i32* [[V2]], i32** [[V:%[a-z0-9]+]], align 4
-  // CHECK: [[V3:%[a-z0-9]+]] = load i32*, i32** [[V]], align 4
-  // CHECK: [[V4:%[a-z0-9]+]] = bitcast i32* [[V3]] to i8*
-  // CHECK: call void @f(i8* noundef [[V4]])
+  // CHECK: [[I:%[a-z0-9]+]] = load ptr, ptr [[AP]]
+  // CHECK: [[P:%[a-z0-9]+]] = load ptr, ptr [[I]]
+  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, ptr [[I]], i32 4
+  // CHECK: store ptr [[IN]], ptr [[AP]]
+  // CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[TMP]], ptr align 4 [[P]], i32 16, i1 false)
+  // CHECK: [[V2:%[a-z0-9]+]] = getelementptr inbounds [4 x i32], ptr [[TMP]], i32 0, i32 0
+  // CHECK: store ptr [[V2]], ptr [[V:%[a-z0-9]+]], align 4
+  // CHECK: [[V3:%[a-z0-9]+]] = load ptr, ptr [[V]], align 4
+  // CHECK: call void @f(ptr noundef [[V3]])
 
   double v7 = va_arg (ap, double);
   f(&v7);
-  // CHECK: [[I:%[a-z0-9]+]] = load i8*, i8** [[AP]]
-  // CHECK: [[P:%[a-z0-9]+]] = bitcast i8* [[I]] to double*
-  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, i8* [[I]], i32 8
-  // CHECK: store i8* [[IN]], i8** [[AP]]
-  // CHECK: [[V1:%[a-z0-9]+]] = load double, double* [[P]]
-  // CHECK: store double [[V1]], double* [[V:%[a-z0-9]+]], align 4
-  // CHECK: [[V2:%[a-z0-9]+]] = bitcast double* [[V]] to i8*
-  // CHECK: call void @f(i8* noundef [[V2]])
+  // CHECK: [[I:%[a-z0-9]+]] = load ptr, ptr [[AP]]
+  // CHECK: [[IN:%[a-z0-9]+]] = getelementptr inbounds i8, ptr [[I]], i32 8
+  // CHECK: store ptr [[IN]], ptr [[AP]]
+  // CHECK: [[V1:%[a-z0-9]+]] = load double, ptr [[I]]
+  // CHECK: store double [[V1]], ptr [[V:%[a-z0-9]+]], align 4
+  // CHECK: call void @f(ptr noundef [[V]])
 }
 
 void testbuiltin (void) {
@@ -123,9 +109,9 @@ void testbuiltin (void) {
   ui = __builtin_bitrev(ui);
   __builtin_setps(i,ui);
 
-  // CHECK: store volatile i32 0, i32* {{%[a-z0-9]+}}, align 4
-  // CHECK: store volatile i32 1, i32* {{%[a-z0-9]+}}, align 4
-  // CHECK: store volatile i32 -1, i32* {{%[a-z0-9]+}}, align 4
+  // CHECK: store volatile i32 0, ptr {{%[a-z0-9]+}}, align 4
+  // CHECK: store volatile i32 1, ptr {{%[a-z0-9]+}}, align 4
+  // CHECK: store volatile i32 -1, ptr {{%[a-z0-9]+}}, align 4
   volatile int res;
   res = __builtin_eh_return_data_regno(0);
   res = __builtin_eh_return_data_regno(1);

diff  --git a/clang/test/CodeGen/xcore-stringtype.c b/clang/test/CodeGen/xcore-stringtype.c
index 4b9429caa1df..d87c0c1277e9 100644
--- a/clang/test/CodeGen/xcore-stringtype.c
+++ b/clang/test/CodeGen/xcore-stringtype.c
@@ -1,5 +1,5 @@
 // REQUIRES: xcore-registered-target
-// RUN: %clang_cc1 -no-opaque-pointers -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - %s | FileCheck %s
 
 // CHECK: target triple = "xcore-unknown-unknown"
 
@@ -23,8 +23,7 @@
 
 
 // test BuiltinType
-// CHECK: !{{[0-9]+}} = !{void (i1, i8, i8, i8, i16, i16, i16, i32, i32, i32,
-// CHECK:      i32, i32, i32, i64, i64, i64, float, double, double)*
+// CHECK: !{{[0-9]+}} = !{ptr
 // CHECK:      @builtinType, !"f{0}(b,uc,uc,sc,ss,us,ss,si,ui,si,sl,
 // CHECK:      ul,sl,sll,ull,sll,ft,d,ld)"}
 void builtinType(_Bool B, char C, unsigned char UC, signed char SC, short S,
@@ -36,14 +35,14 @@ double _Complex Complex; // not supported
 
 
 // test FunctionType & Qualifiers
-// CHECK: !{{[0-9]+}} = !{void ()* @gI, !"f{0}()"}
-// CHECK: !{{[0-9]+}} = !{void (...)* @eI, !"f{0}()"}
-// CHECK: !{{[0-9]+}} = !{void ()* @gV, !"f{0}(0)"}
-// CHECK: !{{[0-9]+}} = !{void ()* @eV, !"f{0}(0)"}
-// CHECK: !{{[0-9]+}} = !{void (i32, ...)* @gVA, !"f{0}(si,va)"}
-// CHECK: !{{[0-9]+}} = !{void (i32, ...)* @eVA, !"f{0}(si,va)"}
-// CHECK: !{{[0-9]+}} = !{i32* (i32*)* @gQ, !"f{crv:p(cv:si)}(p(cv:si))"}
-// CHECK: !{{[0-9]+}} = !{i32* (i32*)* @eQ, !"f{crv:p(cv:si)}(p(cv:si))"}
+// CHECK: !{{[0-9]+}} = !{ptr @gI, !"f{0}()"}
+// CHECK: !{{[0-9]+}} = !{ptr @eI, !"f{0}()"}
+// CHECK: !{{[0-9]+}} = !{ptr @gV, !"f{0}(0)"}
+// CHECK: !{{[0-9]+}} = !{ptr @eV, !"f{0}(0)"}
+// CHECK: !{{[0-9]+}} = !{ptr @gVA, !"f{0}(si,va)"}
+// CHECK: !{{[0-9]+}} = !{ptr @eVA, !"f{0}(si,va)"}
+// CHECK: !{{[0-9]+}} = !{ptr @gQ, !"f{crv:p(cv:si)}(p(cv:si))"}
+// CHECK: !{{[0-9]+}} = !{ptr @eQ, !"f{crv:p(cv:si)}(p(cv:si))"}
 extern void eI();
 void gI() {eI();};
 extern void eV(void);
@@ -57,10 +56,10 @@ const volatile int* volatile restrict const
 
 
 // test PointerType
-// CHECK: !{{[0-9]+}} = !{i32* (i32*, i32* (i32*)*)*
+// CHECK: !{{[0-9]+}} = !{ptr
 // CHECK:       @pointerType, !"f{p(si)}(p(si),p(f{p(si)}(p(si))))"}
-// CHECK: !{{[0-9]+}} = !{i32** @EP, !"p(si)"}
-// CHECK: !{{[0-9]+}} = !{i32** @GP, !"p(si)"}
+// CHECK: !{{[0-9]+}} = !{ptr @EP, !"p(si)"}
+// CHECK: !{{[0-9]+}} = !{ptr @GP, !"p(si)"}
 extern int* EP;
 int* GP;
 int* pointerType(int *I, int * (*FP)(int *)) {
@@ -68,19 +67,19 @@ int* pointerType(int *I, int * (*FP)(int *)) {
 }
 
 // test ArrayType
-// CHECK: !{{[0-9]+}} = !{[2 x i32]* (i32*, i32*, [2 x i32]*, [2 x i32]*, i32*)*
+// CHECK: !{{[0-9]+}} = !{ptr
 // CHECK:       @arrayType, !"f{p(a(2:si))}(p(si),p(cv:si),p(a(2:si)),
 // CHECK:       p(a(2:si)),p(si))"}
-// CHECK: !{{[0-9]+}} = !{[0 x i32]* @EA1, !"a(*:cv:si)"}
-// CHECK: !{{[0-9]+}} = !{[2 x i32]* @EA2, !"a(2:si)"}
-// CHECK: !{{[0-9]+}} = !{[0 x [2 x i32]]* @EA3, !"a(*:a(2:si))"}
-// CHECK: !{{[0-9]+}} = !{[3 x [2 x i32]]* @EA4, !"a(3:a(2:si))"}
-// CHECK: !{{[0-9]+}} = !{[2 x i32]* @GA1, !"a(2:cv:si)"}
-// CHECK: !{{[0-9]+}} = !{void ([2 x i32]*)* @arrayTypeVariable1,
+// CHECK: !{{[0-9]+}} = !{ptr @EA1, !"a(*:cv:si)"}
+// CHECK: !{{[0-9]+}} = !{ptr @EA2, !"a(2:si)"}
+// CHECK: !{{[0-9]+}} = !{ptr @EA3, !"a(*:a(2:si))"}
+// CHECK: !{{[0-9]+}} = !{ptr @EA4, !"a(3:a(2:si))"}
+// CHECK: !{{[0-9]+}} = !{ptr @GA1, !"a(2:cv:si)"}
+// CHECK: !{{[0-9]+}} = !{ptr @arrayTypeVariable1,
 // CHECK:       !"f{0}(p(a(2:si)))"}
-// CHECK: !{{[0-9]+}} = !{void (void ([2 x i32]*)*)* @arrayTypeVariable2,
+// CHECK: !{{[0-9]+}} = !{ptr @arrayTypeVariable2,
 // CHECK:       !"f{0}(p(f{0}(p(a(2:si)))))"}
-// CHECK: !{{[0-9]+}} = !{[3 x [2 x i32]]* @GA2, !"a(3:a(2:si))"}
+// CHECK: !{{[0-9]+}} = !{ptr @GA2, !"a(3:a(2:si))"}
 extern int GA2[3][2];
 extern const volatile int EA1[];
 extern int EA2[2];
@@ -108,16 +107,16 @@ RetType* arrayType(int A1[], int const volatile A2[2], int A3[][2],
 
 
 // test StructureType
-// CHECK: !{{[0-9]+}} = !{void (%struct.S1*)* @structureType1,
+// CHECK: !{{[0-9]+}} = !{ptr @structureType1,
 // CHECK:       !"f{0}(s(S1){m(ps2){p(s(S2){m(ps3){p(s(S3){m(s1){s(S1){}}})}})}})"}
-// CHECK: !{{[0-9]+}} = !{void (%struct.S2*)* @structureType2,
+// CHECK: !{{[0-9]+}} = !{ptr @structureType2,
 // CHECK:       !"f{0}(s(S2){m(ps3){p(s(S3){m(s1){s(S1){m(ps2){p(s(S2){})}}}})}})"}
-// CHECK: !{{[0-9]+}} = !{void (%struct.S3*)* @structureType3,
+// CHECK: !{{[0-9]+}} = !{ptr @structureType3,
 // CHECK:       !"f{0}(s(S3){m(s1){s(S1){m(ps2){p(s(S2){m(ps3){p(s(S3){})}})}}}})"}
-// CHECK: !{{[0-9]+}} = !{void (%struct.S4*)* @structureType4,
+// CHECK: !{{[0-9]+}} = !{ptr @structureType4,
 // CHECK:       !"f{0}(s(S4){m(s1){s(S1){m(ps2){p(s(S2){m(ps3){p(s(S3){m(s1){s(S1){}}})}})}}}})"}
-// CHECK: !{{[0-9]+}} = !{%struct.anon* @StructAnon, !"s(){m(A){si}}"}
-// CHECK: !{{[0-9]+}} = !{i32 (%struct.SB*)* @structureTypeB,
+// CHECK: !{{[0-9]+}} = !{ptr @StructAnon, !"s(){m(A){si}}"}
+// CHECK: !{{[0-9]+}} = !{ptr @structureTypeB,
 // CHECK:       !"f{si}(s(SB){m(){b(4:si)},m(){b(2:si)},m(N4){b(4:si)},
 // CHECK:       m(N2){b(2:si)},m(){b(4:ui)},m(){b(4:si)},m(){b(4:c:si)},
 // CHECK:       m(){b(4:c:si)},m(){b(4:cv:si)}})"}
@@ -138,16 +137,16 @@ int structureTypeB(struct SB sb){return StructAnon.A;}
 
 
 // test UnionType
-// CHECK: !{{[0-9]+}} = !{void (%union.U1*)* @unionType1,
+// CHECK: !{{[0-9]+}} = !{ptr @unionType1,
 // CHECK:       !"f{0}(u(U1){m(pu2){p(u(U2){m(pu3){p(u(U3){m(u1){u(U1){}}})}})}})"}
-// CHECK: !{{[0-9]+}} = !{void (%union.U2*)* @unionType2,
+// CHECK: !{{[0-9]+}} = !{ptr @unionType2,
 // CHECK:       !"f{0}(u(U2){m(pu3){p(u(U3){m(u1){u(U1){m(pu2){p(u(U2){})}}}})}})"}
-// CHECK: !{{[0-9]+}} = !{void (%union.U3*)* @unionType3,
+// CHECK: !{{[0-9]+}} = !{ptr @unionType3,
 // CHECK:       !"f{0}(u(U3){m(u1){u(U1){m(pu2){p(u(U2){m(pu3){p(u(U3){})}})}}}})"}
-// CHECK: !{{[0-9]+}} = !{void (%union.U4*)* @unionType4,
+// CHECK: !{{[0-9]+}} = !{ptr @unionType4,
 // CHECK:       !"f{0}(u(U4){m(u1){u(U1){m(pu2){p(u(U2){m(pu3){p(u(U3){m(u1){u(U1){}}})}})}}}})"}
-// CHECK: !{{[0-9]+}} = !{%union.anon* @UnionAnon, !"u(){m(A){si}}"}
-// CHECK: !{{[0-9]+}} = !{i32 (%union.UB*)* @unionTypeB,
+// CHECK: !{{[0-9]+}} = !{ptr @UnionAnon, !"u(){m(A){si}}"}
+// CHECK: !{{[0-9]+}} = !{ptr @unionTypeB,
 // CHECK:       !"f{si}(u(UB){m(N2){b(2:si)},m(N4){b(4:si)},m(){b(2:si)},
 // CHECK:       m(){b(4:c:si)},m(){b(4:c:si)},m(){b(4:cv:si)},m(){b(4:si)},
 // CHECK:       m(){b(4:si)},m(){b(4:ui)}})"}
@@ -168,17 +167,17 @@ int unionTypeB(union UB ub) {return UnionAnon.A;}
 
 
 // test EnumType
-// CHECK: !{{[0-9]+}} = !{i32* @EnumAnon, !"e(){m(EA){3}}"}
-// CHECK: !{{[0-9]+}} = !{i32 (i32)* @enumType,
+// CHECK: !{{[0-9]+}} = !{ptr @EnumAnon, !"e(){m(EA){3}}"}
+// CHECK: !{{[0-9]+}} = !{ptr @enumType,
 // CHECK:       !"f{si}(e(E){m(A){7},m(B){6},m(C){5},m(D){0}})"}
 enum E {D, C=5, B, A};
 enum {EA=3} EnumAnon = EA;
 int enumType(enum E e) {return EnumAnon;}
 
 
-// CHECK: !{{[0-9]+}} = !{i32 ()* @testReDecl, !"f{si}()"}
-// CHECK: !{{[0-9]+}} = !{[10 x i32]* @After, !"a(10:si)"}
-// CHECK: !{{[0-9]+}} = !{[10 x i32]* @Before, !"a(10:si)"}
+// CHECK: !{{[0-9]+}} = !{ptr @testReDecl, !"f{si}()"}
+// CHECK: !{{[0-9]+}} = !{ptr @After, !"a(10:si)"}
+// CHECK: !{{[0-9]+}} = !{ptr @Before, !"a(10:si)"}
 extern int After[];
 extern int Before[10];
 int testReDecl() {return After[0] + Before[0];}


        


More information about the cfe-commits mailing list