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

llvm-svn: 4032
This commit is contained in:
Nick Hildenbrandt 2002-10-03 20:47:24 +00:00
parent fcdb95cd42
commit 1ccdc12400

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 << "(";