print the computation type for compound assignment operators in dumps.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41361 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/StmtDumper.cpp b/AST/StmtDumper.cpp
index cf1eab1..25caaef 100644
--- a/AST/StmtDumper.cpp
+++ b/AST/StmtDumper.cpp
@@ -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());
diff --git a/CodeGen/CGExprScalar.cpp b/CodeGen/CGExprScalar.cpp
index 6bdcc93..9c2aa36 100644
--- a/CodeGen/CGExprScalar.cpp
+++ b/CodeGen/CGExprScalar.cpp
@@ -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*/,