[cfe-commits] r86778 - /cfe/trunk/lib/CodeGen/CGCXX.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue Nov 10 17:13:34 PST 2009
Author: fjahanian
Date: Tue Nov 10 19:13:34 2009
New Revision: 86778
URL: http://llvm.org/viewvc/llvm-project?rev=86778&view=rev
Log:
Avoid generating additional destructor(s) for initialized constructed
objects.
Modified:
cfe/trunk/lib/CodeGen/CGCXX.cpp
Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXX.cpp?rev=86778&r1=86777&r2=86778&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXX.cpp Tue Nov 10 19:13:34 2009
@@ -79,6 +79,9 @@
EmitComplexExprIntoAddr(Init, DeclPtr, isVolatile);
} else {
EmitAggExpr(Init, DeclPtr, isVolatile);
+ // Avoid generating destructor(s) for initialized objects.
+ if (!isa<CXXConstructExpr>(Init))
+ return;
const ConstantArrayType *Array = getContext().getAsConstantArrayType(T);
if (Array)
T = getContext().getBaseElementType(Array);
More information about the cfe-commits
mailing list