Add parens around constant calls to getelemptr to properly associate the reference

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4032 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Hildenbrandt 2002-10-03 20:47:24 +00:00
parent 55c1058135
commit d2eb386c16
2 changed files with 4 additions and 4 deletions

View File

@ -337,10 +337,10 @@ void CWriter::printConstant(Constant *CPV) {
return;
case Instruction::GetElementPtr:
Out << "&(";
Out << "(&(";
printIndexingExpression(CPV->getOperand(0),
CPV->op_begin()+1, CPV->op_end());
Out << ")";
Out << "))";
return;
case Instruction::Add:
Out << "(";

View File

@ -337,10 +337,10 @@ void CWriter::printConstant(Constant *CPV) {
return;
case Instruction::GetElementPtr:
Out << "&(";
Out << "(&(";
printIndexingExpression(CPV->getOperand(0),
CPV->op_begin()+1, CPV->op_end());
Out << ")";
Out << "))";
return;
case Instruction::Add:
Out << "(";