[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp ReaderWrappers.cpp
Reid Spencer
reid at x10sys.com
Wed Aug 4 15:56:56 PDT 2004
Changes in directory llvm/lib/Bytecode/Reader:
Reader.cpp updated: 1.122 -> 1.123
ReaderWrappers.cpp updated: 1.25 -> 1.26
---
Log message:
Turn a use of intptr_t into a reinterpret_cast<uint64_t> instead to get
rid of compilation warnings on some platforms.
---
Diffs of the changes: (+3 -2)
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.122 llvm/lib/Bytecode/Reader/Reader.cpp:1.123
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.122 Tue Aug 3 19:19:23 2004
+++ llvm/lib/Bytecode/Reader/Reader.cpp Wed Aug 4 17:56:46 2004
@@ -462,7 +462,8 @@
error("Corrupt compaction table entry!"
+ utostr(TyID) + ", " + utostr(SlotNo) + ": "
+ utostr(ModuleValues.size()) + ", "
- + utohexstr(intptr_t((void*)ModuleValues[TyID])) + ", "
+ + utohexstr(reinterpret_cast<uint64_t>(((void*)ModuleValues[TyID])))
+ + ", "
+ utostr(ModuleValues[TyID]->size()));
}
return ModuleValues[TyID]->getOperand(SlotNo);
Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp
diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.25 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.26
--- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.25 Sun Jul 4 19:57:50 2004
+++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Wed Aug 4 17:56:46 2004
@@ -102,7 +102,7 @@
{
// If not aligned, allocate a new buffer to hold the bytecode...
const unsigned char *ParseBegin = 0;
- if ((intptr_t)Buf & 3) {
+ if (reinterpret_cast<uint64_t>(Buf) & 3) {
Buffer = new unsigned char[Length+4];
unsigned Offset = 4 - ((intptr_t)Buffer & 3); // Make sure it's aligned
ParseBegin = Buffer + Offset;
More information about the llvm-commits
mailing list