mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
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:
parent
55c1058135
commit
d2eb386c16
@ -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 << "(";
|
||||
|
@ -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 << "(";
|
||||
|
Loading…
x
Reference in New Issue
Block a user