[cfe-commits] r41361 - in /cfe/trunk: AST/StmtDumper.cpp CodeGen/CGExprScalar.cpp

Chris Lattner sabre at nondot.org
Fri Aug 24 09:24:49 PDT 2007


Author: lattner
Date: Fri Aug 24 11:24:49 2007
New Revision: 41361

URL: http://llvm.org/viewvc/llvm-project?rev=41361&view=rev
Log:
print the computation type for compound assignment operators in dumps.

Modified:
    cfe/trunk/AST/StmtDumper.cpp
    cfe/trunk/CodeGen/CGExprScalar.cpp

Modified: cfe/trunk/AST/StmtDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/StmtDumper.cpp?rev=41361&r1=41360&r2=41361&view=diff

==============================================================================
--- cfe/trunk/AST/StmtDumper.cpp (original)
+++ cfe/trunk/AST/StmtDumper.cpp Fri Aug 24 11:24:49 2007
@@ -425,7 +425,12 @@
 }
 void StmtDumper::VisitBinaryOperator(BinaryOperator *Node) {
   DumpExpr(Node);
-  fprintf(F, " '%s'\n", BinaryOperator::getOpcodeStr(Node->getOpcode()));
+  fprintf(F, " '%s'", BinaryOperator::getOpcodeStr(Node->getOpcode()));
+  if (CompoundAssignOperator *CAO = dyn_cast<CompoundAssignOperator>(Node)) {
+    fprintf(F, " ComputeTy=");
+    DumpType(CAO->getComputationType());
+  }
+  fprintf(F, "\n");
   DumpSubTree(Node->getLHS());
   fprintf(F, "\n");
   DumpSubTree(Node->getRHS());

Modified: cfe/trunk/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGExprScalar.cpp?rev=41361&r1=41360&r2=41361&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/CodeGen/CGExprScalar.cpp Fri Aug 24 11:24:49 2007
@@ -293,7 +293,7 @@
 //===----------------------------------------------------------------------===//
 
 Value *ScalarExprEmitter::VisitPrePostIncDec(const UnaryOperator *E,
-                                                    bool isInc, bool isPre) {
+                                             bool isInc, bool isPre) {
   LValue LV = EmitLValue(E->getSubExpr());
   // FIXME: Handle volatile!
   Value *InVal = CGF.EmitLoadOfLValue(LV/* false*/,





More information about the cfe-commits mailing list