llvm.org GIT mirror llvm / 96b207c
Fix PR1679, by printing GEP indices as signed values instead of unsigned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42239 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 2 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
12371237 shouldCast = true;
12381238 castIsSigned = false;
12391239 break;
1240 case Instruction::GetElementPtr:
12401241 case Instruction::AShr:
12411242 case Instruction::SDiv:
12421243 case Instruction::SRem: // Cast to signed first
28582859 Out << ".field" << cast(I.getOperand())->getZExtValue();
28592860 } else {
28602861 Out << '[';
2861 writeOperand(I.getOperand());
2862 writeOperandWithCast(I.getOperand(), Instruction::GetElementPtr);
28622863 Out << ']';
28632864 }
28642865 }