diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-12 05:53:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-12 05:53:08 +0000 |
commit | 73e3004e75fcb0a27786c6cc333dc2ffeaeba7e1 (patch) | |
tree | 3e123e50c6d1ecf1b281b834a6de92ec2b564d33 /clang/test/CodeGen/designated-initializers.c | |
parent | 6ebfbf5092e34836b17087f7b13af8afb20e1604 (diff) | |
download | bcm5719-llvm-73e3004e75fcb0a27786c6cc333dc2ffeaeba7e1.tar.gz bcm5719-llvm-73e3004e75fcb0a27786c6cc333dc2ffeaeba7e1.zip |
fix an unintended behavior change in the type system rewrite, which caused us to compile
stuff like this:
typedef struct {
int x, y, z;
} foo_t;
foo_t g;
into:
%"struct.<anonymous>" = type { i32, i32, i32 }
we now get:
%struct.foo_t = type { i32, i32, i32 }
This doesn't change the behavior of the compiler, but makes the IR much easier to read.
llvm-svn: 134969
Diffstat (limited to 'clang/test/CodeGen/designated-initializers.c')
-rw-r--r-- | clang/test/CodeGen/designated-initializers.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 = { }; |