projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d40bc4a
)
Fix PR1679, by printing GEP indices as signed values instead of unsigned.
author
Chris Lattner
<sabre@nondot.org>
Sat, 22 Sep 2007 20:16:48 +0000
(20:16 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 22 Sep 2007 20:16:48 +0000
(20:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42239
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/CBackend/CBackend.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/CBackend/CBackend.cpp
b/lib/Target/CBackend/CBackend.cpp
index 294f97529bd4d7857ab6a4ab1736bc71be712ed8..bc085241d05040eb237e221859087d8794b9a891 100644
(file)
--- a/
lib/Target/CBackend/CBackend.cpp
+++ b/
lib/Target/CBackend/CBackend.cpp
@@
-1238,6
+1238,7
@@
void CWriter::writeOperandWithCast(Value* Operand, unsigned Opcode) {
shouldCast = true;
castIsSigned = false;
break;
+ case Instruction::GetElementPtr:
case Instruction::AShr:
case Instruction::SDiv:
case Instruction::SRem: // Cast to signed first
@@
-2859,7
+2860,7
@@
void CWriter::printIndexingExpression(Value *Ptr, gep_type_iterator I,
Out << ".field" << cast<ConstantInt>(I.getOperand())->getZExtValue();
} else {
Out << '[';
- writeOperand
(I.getOperand()
);
+ writeOperand
WithCast(I.getOperand(), Instruction::GetElementPtr
);
Out << ']';
}
}