[cfe-commits] r147664 - in /cfe/trunk/lib: AST/Expr.cpp CodeGen/CGExprAgg.cpp CodeGen/CGExprComplex.cpp CodeGen/CGExprScalar.cpp Driver/Tools.cpp Serialization/ASTReaderDecl.cpp
Chris Lattner
clattner at apple.com
Fri Jan 6 16:21:44 PST 2012
On Jan 6, 2012, at 3:08 PM, John McCall wrote:
> On Jan 6, 2012, at 9:44 AM, Jakub Staszak wrote:
>> Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=147664&r1=147663&r2=147664&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Fri Jan 6 11:44:30 2012
>> @@ -469,7 +469,7 @@
>> llvm::BasicBlock *ContBlock = CGF.createBasicBlock("cond.end");
>>
>> // Bind the common expression if necessary.
>> - CodeGenFunction::OpaqueValueMapping binding(CGF, E);
>> + CodeGenFunction::OpaqueValueMapping(CGF, E);
>>
>> CodeGenFunction::ConditionalEvaluation eval(CGF);
>> CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock);
>
> The obvious source of breakage here is that this is not at all semantically
> equivalent. The original statement declares an object that is destroyed
> at the end of the scope. Your replacement creates a temporary object
> which is immediately destroyed.
Shouldn't this be reverted then?
-Chris
More information about the cfe-commits
mailing list