llvm::Value *Cond = CGF.EvaluateExprAsBool(E->getCond());
Builder.CreateCondBr(Cond, LHSBlock, RHSBlock);
+ CGF.PushConditionalTempDestruction();
CGF.EmitBlock(LHSBlock);
// Handle the GNU extension for missing LHS.
assert(E->getLHS() && "Must have LHS for aggregate value");
Visit(E->getLHS());
+ CGF.PopConditionalTempDestruction();
CGF.EmitBranch(ContBlock);
+ CGF.PushConditionalTempDestruction();
CGF.EmitBlock(RHSBlock);
Visit(E->getRHS());
+ CGF.PopConditionalTempDestruction();
CGF.EmitBranch(ContBlock);
CGF.EmitBlock(ContBlock);
CGF.getContext().BoolTy);
Builder.CreateCondBr(CondBoolVal, LHSBlock, RHSBlock);
}
-
+
+ CGF.PushConditionalTempDestruction();
CGF.EmitBlock(LHSBlock);
// Handle the GNU extension for missing LHS.
else // Perform promotions, to handle cases like "short ?: int"
LHS = EmitScalarConversion(CondVal, E->getCond()->getType(), E->getType());
+ CGF.PopConditionalTempDestruction();
LHSBlock = Builder.GetInsertBlock();
CGF.EmitBranch(ContBlock);
+ CGF.PushConditionalTempDestruction();
CGF.EmitBlock(RHSBlock);
Value *RHS = Visit(E->getRHS());
+ CGF.PopConditionalTempDestruction();
RHSBlock = Builder.GetInsertBlock();
CGF.EmitBranch(ContBlock);