aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 55fc6704b7..4d53b7adf6 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -952,13 +952,9 @@ void CWriter::printIndexingExpression(Value *Ptr, User::op_iterator I,
for (; I != E; ++I)
if ((*I)->getType() == Type::LongTy) {
- Out << "[((int) ("; // sign-extend from 32 (to 64) bits
+ Out << "[";
writeOperand(*I);
- Out << " * sizeof(";
- printType(cast<PointerType>(Ptr->getType())->getElementType());
- Out << "))) / sizeof(";
- printType(cast<PointerType>(Ptr->getType())->getElementType());
- Out << ")]";
+ Out << "]";
} else {
Out << ".field" << cast<ConstantUInt>(*I)->getValue();
}