diff options
| author | Anders Carlsson <andersca@mac.com> | 2009-06-04 02:53:13 +0000 | 
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2009-06-04 02:53:13 +0000 | 
| commit | f47a3de83c2a39d5b28ca20a08892dafd1e85f8e (patch) | |
| tree | 0b4bff687127526aee7c5b6df5a7d7c9c2ed0663 /clang | |
| parent | 7d313fc09b9097129c098a1c11d2a7a71556ec0b (diff) | |
| download | bcm5719-llvm-f47a3de83c2a39d5b28ca20a08892dafd1e85f8e.tar.gz bcm5719-llvm-f47a3de83c2a39d5b28ca20a08892dafd1e85f8e.zip  | |
Use conditional temp destruction for || and &&.
llvm-svn: 72838
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 950e9e55095..faa4f7611d0 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -1290,8 +1290,10 @@ Value *ScalarExprEmitter::VisitBinLAnd(const BinaryOperator *E) {         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 @@ Value *ScalarExprEmitter::VisitBinLOr(const BinaryOperator *E) {         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();  | 

