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
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index b335e90..a64fb09 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -506,9 +506,10 @@
}
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();