From 8dca3b3d09ff48b3ec528cd603f835f120c4d9ee Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Mon, 27 Jul 2009 05:54:15 +0000 Subject: 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 --- lib/CodeGen/CGExprConstant.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CGExprConstant.cpp') 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(ConvertType(ILE->getType())); RecordDecl *RD = ILE->getType()->getAsRecordType()->getDecl(); -- cgit v1.2.3