summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CodeGenTypes.cpp8
-rw-r--r--clang/test/CodeGen/const-arithmetic.c4
-rw-r--r--clang/test/CodeGen/const-init.c4
-rw-r--r--clang/test/CodeGen/designated-initializers.c10
-rw-r--r--clang/test/CodeGen/regparm.c2
-rw-r--r--clang/test/CodeGen/transparent-union.c2
-rw-r--r--clang/test/CodeGen/x86_64-arguments.c2
-rw-r--r--clang/test/CodeGenCXX/pointers-to-data-members.cpp4
8 files changed, 18 insertions, 18 deletions
diff --git a/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp
index 84b9fba5fd4..64348ea7d1e 100644
--- a/clang/lib/CodeGen/CodeGenTypes.cpp
+++ b/clang/lib/CodeGen/CodeGenTypes.cpp
@@ -451,10 +451,10 @@ llvm::StructType *CodeGenTypes::ConvertRecordDeclType(const RecordDecl *RD) {
llvm::StructType *&Entry = RecordDeclTypes[Key];
// If we don't have a StructType at all yet, create the forward declaration.
- if (Entry == 0)
- Entry = llvm::StructType::createNamed(getLLVMContext(),
- std::string(RD->getKindName()) + "." +
- RD->getQualifiedNameAsString());
+ if (Entry == 0) {
+ Entry = llvm::StructType::createNamed(getLLVMContext(), "");
+ addRecordTypeName(RD, Entry, "");
+ }
llvm::StructType *Ty = Entry;
// If this is still a forward declaration, or the LLVM type is already
diff --git a/clang/test/CodeGen/const-arithmetic.c b/clang/test/CodeGen/const-arithmetic.c
index 5b7a9ec412a..a28f73f004e 100644
--- a/clang/test/CodeGen/const-arithmetic.c
+++ b/clang/test/CodeGen/const-arithmetic.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
-// CHECK: @g1 = global [2 x i8*] [i8* getelementptr (i8* getelementptr inbounds ([0 x %"struct.<anonymous>"]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8* getelementptr inbounds ([0 x %"struct.<anonymous>"]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16
-// CHECK: @g2 = global [2 x i8*] [i8* getelementptr (i8* getelementptr inbounds ([0 x %"struct.<anonymous>"]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8* getelementptr inbounds ([0 x %"struct.<anonymous>"]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16
+// CHECK: @g1 = global [2 x i8*] [i8* getelementptr (i8* getelementptr inbounds ([0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8* getelementptr inbounds ([0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16
+// CHECK: @g2 = global [2 x i8*] [i8* getelementptr (i8* getelementptr inbounds ([0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -2), i8* getelementptr (i8* getelementptr inbounds ([0 x %struct.anon]* @g0, i32 0, i32 0, i32 0), i64 -46)], align 16
extern struct { unsigned char a, b; } g0[];
void *g1[] = {g0 + -1, g0 + -23 };
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c
index 7062fdba6d9..9bc3bbafdef 100644
--- a/clang/test/CodeGen/const-init.c
+++ b/clang/test/CodeGen/const-init.c
@@ -52,14 +52,14 @@ int g9 = (2 + 3i) * (5 + 7i) != (-11 + 29i);
int g10 = (2.0 + 3.0i) * (5.0 + 7.0i) != (-11.0 + 29.0i);
// PR5108
-// CHECK: @gv1 = global %"struct.<anonymous>" <{ i32 0, i8 7 }>, align 1
+// CHECK: @gv1 = global %struct.anon <{ i32 0, i8 7 }>, align 1
struct {
unsigned long a;
unsigned long b:3;
} __attribute__((__packed__)) gv1 = { .a = 0x0, .b = 7, };
// PR5118
-// CHECK: @gv2 = global %"struct.<anonymous>.0" <{ i8 1, i8* null }>, align 1
+// CHECK: @gv2 = global %struct.anon.0 <{ i8 1, i8* null }>, align 1
struct {
unsigned char a;
char *b;
diff --git a/clang/test/CodeGen/designated-initializers.c b/clang/test/CodeGen/designated-initializers.c
index ec96dd3214a..6561ce56d82 100644
--- a/clang/test/CodeGen/designated-initializers.c
+++ b/clang/test/CodeGen/designated-initializers.c
@@ -5,13 +5,13 @@ struct foo {
int b;
};
-// CHECK: @u = global %"union.<anonymous>" zeroinitializer
+// CHECK: @u = global %union.anon zeroinitializer
union { int i; float f; } u = { };
// CHECK: @u2 = global { i32, [4 x i8] } { i32 0, [4 x i8] undef }
union { int i; double f; } u2 = { };
-// CHECK: @u3 = global %"union.<anonymous>.1" zeroinitializer
+// CHECK: @u3 = global %union.anon.1 zeroinitializer
union { double f; int i; } u3 = { };
// CHECK: @b = global [2 x i32] [i32 0, i32 22]
@@ -39,11 +39,11 @@ struct ds ds0 = { { { .a = 0 } } };
struct ds ds1 = { { .a = 1 } };
struct ds ds2 = { { .b = 1 } };
struct ds ds3 = { .a = 0 };
-// CHECK: @ds4 = global %struct.ds { %"struct.ds::<anonymous>" { %"struct.ds::<anonymous struct>::<anonymous>" zeroinitializer, i16 0, %"struct.ds::<anonymous struct>::<anonymous>.2" { i16 1 } } }
+// CHECK: @ds4 = global %struct.ds { %struct.anon.3 { %struct.anon zeroinitializer, i16 0, %struct.anon.2 { i16 1 } } }
struct ds ds4 = { .c = 1 };
struct ds ds5 = { { { .a = 0 } }, .b = 1 };
struct ds ds6 = { { .a = 0, .b = 1 } };
-// CHECK: @ds7 = global %struct.ds { %"struct.ds::<anonymous>" { %"struct.ds::<anonymous struct>::<anonymous>" { i16 2 }, i16 3, %"struct.ds::<anonymous struct>::<anonymous>.2" zeroinitializer } }
+// CHECK: @ds7 = global %struct.ds { %struct.anon.3 { %struct.anon { i16 2 }, i16 3, %struct.anon.2 zeroinitializer } }
struct ds ds7 = {
{ {
.a = 1
@@ -59,7 +59,7 @@ void test1(int argc, char **argv)
.b = 1024,
};
- // CHECK: bitcast %union.* %u2
+ // CHECK: bitcast %union.anon.4* %u2
// CHECK: call void @llvm.memset
union { int i; float f; } u2 = { };
diff --git a/clang/test/CodeGen/regparm.c b/clang/test/CodeGen/regparm.c
index 86931bc245c..d628b685f94 100644
--- a/clang/test/CodeGen/regparm.c
+++ b/clang/test/CodeGen/regparm.c
@@ -20,7 +20,7 @@ void f1(int i, int j, int k) { }
int
main(void) {
- // CHECK: call void @reduced(i8 signext inreg 0, {{.*}} %"struct.<anonymous>"* inreg null
+ // CHECK: call void @reduced(i8 signext inreg 0, {{.*}} %struct.foo* inreg null
reduced(0, 0.0, 0, 0.0, 0);
// CHECK: call x86_stdcallcc void {{.*}}(i32 inreg 1, i32 inreg 2)
bar(1,2);
diff --git a/clang/test/CodeGen/transparent-union.c b/clang/test/CodeGen/transparent-union.c
index 7d0c979916a..afdb3d6090b 100644
--- a/clang/test/CodeGen/transparent-union.c
+++ b/clang/test/CodeGen/transparent-union.c
@@ -11,7 +11,7 @@ typedef union {
void f0(transp_t0 obj);
// CHECK: define void @f1_0(i32* %a0)
-// CHECK: call void @f0(%"union.<anonymous>"* byval align 4 %{{.*}})
+// CHECK: call void @f0(%union.transp_t0* byval align 4 %{{.*}})
// CHECK: call void %{{.*}}(i8* %{{[a-z0-9]*}})
// CHECK: }
void f1_0(int *a0) {
diff --git a/clang/test/CodeGen/x86_64-arguments.c b/clang/test/CodeGen/x86_64-arguments.c
index b0218351657..221c7d38a73 100644
--- a/clang/test/CodeGen/x86_64-arguments.c
+++ b/clang/test/CodeGen/x86_64-arguments.c
@@ -58,7 +58,7 @@ struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} }
struct s10 { int a; int b; int : 0; };
void f10(struct s10 a0) {}
-// CHECK: define void @f11(%"union.<anonymous>"* sret %agg.result)
+// CHECK: define void @f11(%union.anon* sret %agg.result)
union { long double a; float b; } f11() { while (1) {} }
// CHECK: define i32 @f12_0()
diff --git a/clang/test/CodeGenCXX/pointers-to-data-members.cpp b/clang/test/CodeGenCXX/pointers-to-data-members.cpp
index e0250410a4c..f0246c89b69 100644
--- a/clang/test/CodeGenCXX/pointers-to-data-members.cpp
+++ b/clang/test/CodeGenCXX/pointers-to-data-members.cpp
@@ -22,7 +22,7 @@ namespace ZeroInit {
// CHECK-GLOBAL: @_ZN8ZeroInit1bE = global i64 -1,
int A::* b = 0;
- // CHECK-GLOBAL: @_ZN8ZeroInit2saE = internal global %"struct.ZeroInit::<anonymous>" { i64 -1 }
+ // CHECK-GLOBAL: @_ZN8ZeroInit2saE = internal global %struct.anon { i64 -1 }
struct {
int A::*a;
} sa;
@@ -35,7 +35,7 @@ namespace ZeroInit {
} ssa[2];
void test_ssa() { (void) ssa; }
- // CHECK-GLOBAL: @_ZN8ZeroInit2ssE = internal global %"struct.ZeroInit::<anonymous>.1" { %"struct.ZeroInit::<anonymous struct>::<anonymous>" { i64 -1 } }
+ // CHECK-GLOBAL: @_ZN8ZeroInit2ssE = internal global %struct.anon.1 { %struct.anon.2 { i64 -1 } }
struct {
struct {
int A::*pa;
OpenPOWER on IntegriCloud