[cfe-commits] r77190 - in /cfe/trunk: lib/CodeGen/CGRecordLayoutBuilder.cpp test/CodeGen/PR3613-static-decl.c test/CodeGen/PR4611-bitfield-layout.c test/CodeGen/cast-to-union.c test/CodeGen/const-init.c test/CodeGen/struct-x86-darwin.c

Anders Carlsson andersca at mac.com
Mon Jul 27 08:32:06 PDT 2009


Author: andersca
Date: Mon Jul 27 10:31:55 2009
New Revision: 77190

URL: http://llvm.org/viewvc/llvm-project?rev=77190&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
    cfe/trunk/test/CodeGen/PR3613-static-decl.c
    cfe/trunk/test/CodeGen/PR4611-bitfield-layout.c
    cfe/trunk/test/CodeGen/cast-to-union.c
    cfe/trunk/test/CodeGen/const-init.c
    cfe/trunk/test/CodeGen/struct-x86-darwin.c

Modified: cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp?rev=77190&r1=77189&r2=77190&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRecordLayoutBuilder.cpp Mon Jul 27 10:31:55 2009
@@ -301,9 +301,6 @@
   
   Builder.Layout(D);
 
-  // FIXME: Once this works well enough, enable it.
-  return 0;
-  
   const llvm::Type *Ty = llvm::StructType::get(Builder.FieldTypes,
                                                Builder.Packed);
   

Modified: cfe/trunk/test/CodeGen/PR3613-static-decl.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/PR3613-static-decl.c?rev=77190&r1=77189&r2=77190&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/PR3613-static-decl.c (original)
+++ cfe/trunk/test/CodeGen/PR3613-static-decl.c Mon Jul 27 10:31:55 2009
@@ -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;

Modified: cfe/trunk/test/CodeGen/PR4611-bitfield-layout.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/PR4611-bitfield-layout.c?rev=77190&r1=77189&r2=77190&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/PR4611-bitfield-layout.c (original)
+++ cfe/trunk/test/CodeGen/PR4611-bitfield-layout.c Mon Jul 27 10:31:55 2009
@@ -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;

Modified: cfe/trunk/test/CodeGen/cast-to-union.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/cast-to-union.c?rev=77190&r1=77189&r2=77190&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/cast-to-union.c (original)
+++ cfe/trunk/test/CodeGen/cast-to-union.c Mon Jul 27 10:31:55 2009
@@ -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; };
 

Modified: cfe/trunk/test/CodeGen/const-init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/const-init.c?rev=77190&r1=77189&r2=77190&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/const-init.c (original)
+++ cfe/trunk/test/CodeGen/const-init.c Mon Jul 27 10:31:55 2009
@@ -59,7 +59,7 @@
 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 @@
   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 {

Modified: cfe/trunk/test/CodeGen/struct-x86-darwin.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/struct-x86-darwin.c?rev=77190&r1=77189&r2=77190&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/struct-x86-darwin.c (original)
+++ cfe/trunk/test/CodeGen/struct-x86-darwin.c Mon Jul 27 10:31:55 2009
@@ -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;





More information about the cfe-commits mailing list