aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-07-31 21:34:04 +0000
committerAnders Carlsson <andersca@mac.com>2009-07-31 21:34:04 +0000
commitf6c43965c41e042f0541bdd47b1511d585b2dcfd (patch)
treedaee83d9c8f47093baf7081c06dc1e3ab090c7f7
parentbb1c8600218b3244340331165fc7cba7bf227655 (diff)
Use the struct builder for unions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77732 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGExprConstant.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 3f342255b4..bf8123648b 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -583,6 +583,8 @@ public:
}
llvm::Constant *EmitUnionInitialization(InitListExpr *ILE) {
+ return ConstStructBuilder::BuildStruct(CGM, CGF, ILE);
+
const llvm::Type *Ty = ConvertType(ILE->getType());
FieldDecl* curField = ILE->getInitializedFieldInUnion();