From: Chris Lattner Date: Wed, 25 Jul 2001 22:48:37 +0000 (+0000) Subject: Parenthesize output for expranalyze so that pointer stuff being multiplied isn't... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=da5cfa369f3bf36a6626aad51c30a15754fa27ce;p=oota-llvm.git Parenthesize output for expranalyze so that pointer stuff being multiplied isn't confusing git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp index 6d35f3e085e..baad23787ba 100644 --- a/tools/analyze/analyze.cpp +++ b/tools/analyze/analyze.cpp @@ -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