Turn a use of intptr_t into a reinterpret_cast<uint64_t> instead to get
authorReid Spencer <rspencer@reidspencer.com>
Wed, 4 Aug 2004 22:56:46 +0000 (22:56 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 4 Aug 2004 22:56:46 +0000 (22:56 +0000)
rid of compilation warnings on some platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15512 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Reader/Reader.cpp
lib/Bytecode/Reader/ReaderWrappers.cpp

index 6f566e79477c04f760d4f25625a86f82af1d5f1a..9ca641932afad4d7f4a04279d73ae589eb89e655 100644 (file)
@@ -462,7 +462,8 @@ Value* BytecodeReader::getGlobalTableValue(unsigned TyID, unsigned SlotNo) {
       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 f8f1101a0181d7098309a8c0dbdfc299b83102bb..a6983d057c3fe79af60cc051e676f2421a7fba3b 100644 (file)
@@ -102,7 +102,7 @@ BytecodeBufferReader::BytecodeBufferReader(const unsigned char *Buf,
 {
   // 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;