From: Eli Friedman Date: Fri, 16 May 2008 20:38:39 +0000 (+0000) Subject: Backout of codegen-based fix to PR2334; this has been fixed differently X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=856226c37ff10955c7f3f07ce6fa9522da23a3a5;p=clang Backout of codegen-based fix to PR2334; this has been fixed differently at the Sema layer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51203 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 8442b8174e..bdd7975fa0 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1050,8 +1050,7 @@ VisitConditionalOperator(const ConditionalOperator *E) { // Handle the GNU extension for missing LHS. Value *LHS; if (E->getLHS()) - LHS = EmitScalarConversion(Visit(E->getLHS()), E->getLHS()->getType(), - E->getType()); + LHS = Visit(E->getLHS()); else // Perform promotions, to handle cases like "short ?: int" LHS = EmitScalarConversion(CondVal, E->getCond()->getType(), E->getType()); @@ -1060,8 +1059,7 @@ VisitConditionalOperator(const ConditionalOperator *E) { CGF.EmitBlock(RHSBlock); - Value *RHS = EmitScalarConversion(Visit(E->getRHS()), E->getRHS()->getType(), - E->getType()); + Value *RHS = Visit(E->getRHS()); Builder.CreateBr(ContBlock); RHSBlock = Builder.GetInsertBlock();