[cfe-commits] r72838 - /cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Anders Carlsson
andersca at mac.com
Wed Jun 3 19:53:13 PDT 2009
Author: andersca
Date: Wed Jun 3 21:53:13 2009
New Revision: 72838
URL: http://llvm.org/viewvc/llvm-project?rev=72838&view=rev
Log:
Use conditional temp destruction for || and &&.
Modified:
cfe/trunk/lib/CodeGen/CGExprScalar.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=72838&r1=72837&r2=72838&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Wed Jun 3 21:53:13 2009
@@ -1290,8 +1290,10 @@
PI != PE; ++PI)
PN->addIncoming(llvm::ConstantInt::getFalse(), *PI);
+ CGF.PushConditionalTempDestruction();
CGF.EmitBlock(RHSBlock);
Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
+ CGF.PopConditionalTempDestruction();
// Reaquire the RHS block, as there may be subblocks inserted.
RHSBlock = Builder.GetInsertBlock();
@@ -1335,10 +1337,14 @@
PI != PE; ++PI)
PN->addIncoming(llvm::ConstantInt::getTrue(), *PI);
+ CGF.PushConditionalTempDestruction();
+
// Emit the RHS condition as a bool value.
CGF.EmitBlock(RHSBlock);
Value *RHSCond = CGF.EvaluateExprAsBool(E->getRHS());
+ CGF.PopConditionalTempDestruction();
+
// Reaquire the RHS block, as there may be subblocks inserted.
RHSBlock = Builder.GetInsertBlock();
More information about the cfe-commits
mailing list