[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
vadve at cs.uiuc.edu
vadve at cs.uiuc.edu
Sun Sep 15 16:52:01 PDT 2002
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.43 -> 1.44
---
Log message:
No longer need to sign-extend array indices to 64 bits since they
are now longs and not unsigned ints.
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.43 llvm/lib/CWriter/Writer.cpp:1.44
--- llvm/lib/CWriter/Writer.cpp:1.43 Sat Sep 14 16:36:24 2002
+++ llvm/lib/CWriter/Writer.cpp Sun Sep 15 16:51:04 2002
@@ -952,13 +952,9 @@
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();
}
More information about the llvm-commits
mailing list