aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-07-27 05:54:15 +0000
committerAnders Carlsson <andersca@mac.com>2009-07-27 05:54:15 +0000
commit8dca3b3d09ff48b3ec528cd603f835f120c4d9ee (patch)
tree3b6b3ed3b83177a439b71cdf232561e514d8267d /lib/CodeGen/CGExprConstant.cpp
parent22bfc7bce3de6da854b6374c6f14e12121315919 (diff)
Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index b335e90faf..a64fb09eca 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -506,9 +506,10 @@ public:
}
llvm::Constant *EmitStructInitialization(InitListExpr *ILE) {
- // FIXME: Use the returned struct when the builder works well enough.
- ConstStructBuilder::BuildStruct(CGM, CGF, ILE);
-
+ return ConstStructBuilder::BuildStruct(CGM, CGF, ILE);
+
+ // FIXME: Remove the old struct builder once we're sure that the new one
+ // works well enough!
const llvm::StructType *SType =
cast<llvm::StructType>(ConvertType(ILE->getType()));
RecordDecl *RD = ILE->getType()->getAsRecordType()->getDecl();