[cfe-commits] r41235 - in /cfe/trunk/CodeGen: CGComplexExpr.cpp CGExpr.cpp
Chris Lattner
sabre at nondot.org
Tue Aug 21 10:15:50 PDT 2007
Author: lattner
Date: Tue Aug 21 12:15:50 2007
New Revision: 41235
URL: http://llvm.org/viewvc/llvm-project?rev=41235&view=rev
Log:
implement comma for complex.
Modified:
cfe/trunk/CodeGen/CGComplexExpr.cpp
cfe/trunk/CodeGen/CGExpr.cpp
Modified: cfe/trunk/CodeGen/CGComplexExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGComplexExpr.cpp?rev=41235&r1=41234&r2=41235&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CGComplexExpr.cpp (original)
+++ cfe/trunk/CodeGen/CGComplexExpr.cpp Tue Aug 21 12:15:50 2007
@@ -77,6 +77,8 @@
// No comparisons produce a complex result.
ComplexPairTy VisitBinAssign (const BinaryOperator *E);
+ ComplexPairTy VisitBinComma (const BinaryOperator *E);
+
ComplexPairTy VisitConditionalOperator(const ConditionalOperator *CO);
// case Expr::ChooseExprClass:
@@ -150,6 +152,10 @@
return Val;
}
+ComplexPairTy ComplexExprEmitter::VisitBinComma(const BinaryOperator *E) {
+ CGF.EmitStmt(E->getLHS());
+ return Visit(E->getRHS());
+}
ComplexPairTy ComplexExprEmitter::
VisitConditionalOperator(const ConditionalOperator *E) {
Modified: cfe/trunk/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExpr.cpp?rev=41235&r1=41234&r2=41235&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/CodeGen/CGExpr.cpp Tue Aug 21 12:15:50 2007
@@ -1353,7 +1353,7 @@
RValue CodeGenFunction::EmitBinaryComma(const BinaryOperator *E) {
- EmitExpr(E->getLHS());
+ EmitStmt(E->getLHS());
return EmitExpr(E->getRHS());
}
More information about the cfe-commits
mailing list