summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-07-27 15:31:55 +0000
committerAnders Carlsson <andersca@mac.com>2009-07-27 15:31:55 +0000
commit72fb384a65d836c810a7889344c8a0c8854d9d16 (patch)
tree2fac3975ea6696ae305b292df0ad8de4f4114ac5
parentb97a3ec4e7459b1376ab36d70dc23d8c0de146cc (diff)
downloadbcm5719-llvm-72fb384a65d836c810a7889344c8a0c8854d9d16.tar.gz
bcm5719-llvm-72fb384a65d836c810a7889344c8a0c8854d9d16.zip
Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.
llvm-svn: 77190
-rw-r--r--clang/lib/CodeGen/CGRecordLayoutBuilder.cpp3
-rw-r--r--clang/test/CodeGen/PR3613-static-decl.c2
-rw-r--r--clang/test/CodeGen/PR4611-bitfield-layout.c2
-rw-r--r--clang/test/CodeGen/cast-to-union.c2
-rw-r--r--clang/test/CodeGen/const-init.c4
-rw-r--r--clang/test/CodeGen/struct-x86-darwin.c18
6 files changed, 14 insertions, 17 deletions
diff --git a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
index adbfd3f1c64..546c5440957 100644
--- a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
+++ b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
@@ -301,9 +301,6 @@ CGRecordLayoutBuilder::ComputeLayout(CodeGenTypes &Types,
Builder.Layout(D);
- // FIXME: Once this works well enough, enable it.
- return 0;
-
const llvm::Type *Ty = llvm::StructType::get(Builder.FieldTypes,
Builder.Packed);
diff --git a/clang/test/CodeGen/PR3613-static-decl.c b/clang/test/CodeGen/PR3613-static-decl.c
index 44de0dc0d7d..20835813000 100644
--- a/clang/test/CodeGen/PR3613-static-decl.c
+++ b/clang/test/CodeGen/PR3613-static-decl.c
@@ -1,5 +1,5 @@
// RUN: clang-cc -triple i386-unknown-unknown -emit-llvm -o %t %s &&
-// RUN: grep '@g0 = internal global %. { i32 3 }' %t | count 1
+// RUN: grep '@g0 = internal global %.truct.s0 { i32 3 }' %t | count 1
struct s0 {
int a;
diff --git a/clang/test/CodeGen/PR4611-bitfield-layout.c b/clang/test/CodeGen/PR4611-bitfield-layout.c
index ef698d5ab37..83ce4ffdbd6 100644
--- a/clang/test/CodeGen/PR4611-bitfield-layout.c
+++ b/clang/test/CodeGen/PR4611-bitfield-layout.c
@@ -1,5 +1,5 @@
// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm -o %t &&
-// RUN: grep "struct.object_entry = type <{ i8, i8, i8, i8 }>" %t
+// RUN: grep "struct.object_entry = type { i8, \[2 x i8\], i8 }" %t
struct object_entry {
unsigned int type:3, pack_id:16, depth:13;
diff --git a/clang/test/CodeGen/cast-to-union.c b/clang/test/CodeGen/cast-to-union.c
index 39644c0c997..9c61a840ecd 100644
--- a/clang/test/CodeGen/cast-to-union.c
+++ b/clang/test/CodeGen/cast-to-union.c
@@ -1,7 +1,7 @@
// RUN: clang-cc -emit-llvm < %s -o %t &&
// RUN: grep "store i32 351, i32*" %t &&
// RUN: grep "w = global %0 { i32 2, \[4 x i8\] zeroinitializer }" %t &&
-// RUN: grep "y = global %1 { double 7.300000e+01 }" %t
+// RUN: grep "y = global %union.u { double 7.300000e+01 }" %t
union u { int i; double d; };
diff --git a/clang/test/CodeGen/const-init.c b/clang/test/CodeGen/const-init.c
index 2ee6f0d7197..106e2ddf904 100644
--- a/clang/test/CodeGen/const-init.c
+++ b/clang/test/CodeGen/const-init.c
@@ -59,7 +59,7 @@ long g11() {
static char g12_tmp;
long g12 = (long) &g12_tmp;
-// RUN: grep '@g13 = global %. <{ %. { i32 ptrtoint (i8\* @g12_tmp to i32) } }>' %t &&
+// RUN: grep '@g13 = global \[1 x %.truct.g13_s0\] \[%.truct.g13_s0 { i32 ptrtoint (i8\* @g12_tmp to i32) }\]' %t &&
struct g13_s0 {
long a;
};
@@ -85,7 +85,7 @@ void g18(void) {
static int *p[] = { &g19 };
}
-// RUN: grep '@g20.l0 = internal global %. { .struct.g20_s0\* null, .struct.g20_s0\*\* getelementptr (.struct.g20_s1\* bitcast (%.\* @g20.l0 to .struct.g20_s1\*), i32 0, i32 0) }' %t &&
+// RUN: grep '@g20.l0 = internal global %.truct.g20_s1 { %.truct.g20_s0\* null, %.truct.g20_s0\*\* getelementptr (%.truct.g20_s1\* @g20.l0, i32 0, i32 0) }' %t &&
struct g20_s0;
struct g20_s1 {
diff --git a/clang/test/CodeGen/struct-x86-darwin.c b/clang/test/CodeGen/struct-x86-darwin.c
index 46dcb0c826c..c61005f1beb 100644
--- a/clang/test/CodeGen/struct-x86-darwin.c
+++ b/clang/test/CodeGen/struct-x86-darwin.c
@@ -1,13 +1,13 @@
// RUN: clang-cc < %s -emit-llvm > %t1 -triple=i686-apple-darwin9 &&
-// Run grep "STest1 = type <{ i32, \[4 x i16\], double }>" %t1 &&
-// RUN: grep "STest2 = type <{ i16, i16, i32, i32 }>" %t1 &&
-// RUN: grep "STest3 = type <{ i8, i8, i16, i32 }>" %t1 &&
-// RUN: grep "STestB1 = type <{ i8, i8 }>" %t1 &&
-// RUN: grep "STestB2 = type <{ i8, i8, i8 }>" %t1 &&
-// RUN: grep "STestB3 = type <{ i8, i8 }>" %t1 &&
-// RUN: grep "STestB4 = type <{ i8, i8, i8, i8 }>" %t1 &&
-// RUN: grep "STestB5 = type <{ i8, i8, i8, i8, i8, i8 }>" %t1 &&
-// RUN: grep "STestB6 = type <{ i8, i8, i8, i8 }>" %t1
+// RUN: grep "STest1 = type { i32, \[4 x i16\], double }" %t1 &&
+// RUN: grep "STest2 = type { i16, i16, i32, i32 }" %t1 &&
+// RUN: grep "STest3 = type { i8, i16, i32 }" %t1 &&
+// RUN: grep "STestB1 = type { i8, i8 }" %t1 &&
+// RUN: grep "STestB2 = type { i8, i8, i8 }" %t1 &&
+// RUN: grep "STestB3 = type { i8, i8 }" %t1 &&
+// RUN: grep "STestB4 = type { i8, i8, i8, i8 }" %t1 &&
+// RUN: grep "STestB5 = type { i8, i8, \[2 x i8\], i8, i8 }" %t1 &&
+// RUN: grep "STestB6 = type { i8, i8, \[2 x i8\] }" %t1
// Test struct layout for x86-darwin target
struct STest1 {int x; short y[4]; double z; } st1;
OpenPOWER on IntegriCloud