[cfe-commits] r77732 - /cfe/trunk/lib/CodeGen/CGExprConstant.cpp
Anders Carlsson
andersca at mac.com
Fri Jul 31 14:34:05 PDT 2009
Author: andersca
Date: Fri Jul 31 16:34:04 2009
New Revision: 77732
URL: http://llvm.org/viewvc/llvm-project?rev=77732&view=rev
Log:
Use the struct builder for unions.
Modified:
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=77732&r1=77731&r2=77732&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Fri Jul 31 16:34:04 2009
@@ -583,6 +583,8 @@
}
llvm::Constant *EmitUnionInitialization(InitListExpr *ILE) {
+ return ConstStructBuilder::BuildStruct(CGM, CGF, ILE);
+
const llvm::Type *Ty = ConvertType(ILE->getType());
FieldDecl* curField = ILE->getInitializedFieldInUnion();
More information about the cfe-commits
mailing list