Parenthesize output for expranalyze so that pointer stuff being multiplied isn't...
authorChris Lattner <sabre@nondot.org>
Wed, 25 Jul 2001 22:48:37 +0000 (22:48 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 25 Jul 2001 22:48:37 +0000 (22:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299 91177308-0d34-0410-b5e6-96231b3b80d8

tools/analyze/analyze.cpp

index 6d35f3e085e0ce89124de60e34cf072a9e3369dc..baad23787ba86949ad80440f5ca35fcb1b62883b 100644 (file)
@@ -44,10 +44,10 @@ static void PrintClassifiedExprs(Method *M) {
     cout << "\t\tExpr =";
     switch (R.ExprTy) {
     case analysis::ExprType::ScaledLinear:
-      WriteAsOperand(cout, (Value*)R.Scale) << " *";
+      WriteAsOperand(cout << "(", (Value*)R.Scale) << " ) *";
       // fall through
     case analysis::ExprType::Linear:
-      WriteAsOperand(cout, R.Var);
+      WriteAsOperand(cout << "(", R.Var) << " )";
       if (R.Offset == 0) break;
       else cout << " +";
       // fall through