[cfe-commits] r41661 - /cfe/trunk/CodeGen/CGExprComplex.cpp
Chris Lattner
sabre at nondot.org
Fri Aug 31 15:51:38 PDT 2007
Author: lattner
Date: Fri Aug 31 17:51:38 2007
New Revision: 41661
URL: http://llvm.org/viewvc/llvm-project?rev=41661&view=rev
Log:
add support for complex stmtexpr's
Modified:
cfe/trunk/CodeGen/CGExprComplex.cpp
Modified: cfe/trunk/CodeGen/CGExprComplex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExprComplex.cpp?rev=41661&r1=41660&r2=41661&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CGExprComplex.cpp (original)
+++ cfe/trunk/CodeGen/CGExprComplex.cpp Fri Aug 31 17:51:38 2007
@@ -92,7 +92,8 @@
return EmitCast(E->getSubExpr(), E->getType());
}
ComplexPairTy VisitCallExpr(const CallExpr *E);
-
+ ComplexPairTy VisitStmtExpr(const StmtExpr *E);
+
// Operators.
ComplexPairTy VisitPrePostIncDec(const UnaryOperator *E,
bool isInc, bool isPre);
@@ -242,6 +243,10 @@
return CGF.EmitCallExpr(E).getComplexVal();
}
+ComplexPairTy ComplexExprEmitter::VisitStmtExpr(const StmtExpr *E) {
+ return CGF.EmitCompoundStmt(*E->getSubStmt(), true).getComplexVal();
+}
+
/// EmitComplexToComplexCast - Emit a cast from complex value Val to DestType.
ComplexPairTy ComplexExprEmitter::EmitComplexToComplexCast(ComplexPairTy Val,
QualType SrcType,
More information about the cfe-commits
mailing list