Fix build breakage on 64-bit systems.
authorJeff Cohen <jeffc@jolt-lang.org>
Tue, 17 Apr 2007 05:33:04 +0000 (05:33 +0000)
committerJeff Cohen <jeffc@jolt-lang.org>
Tue, 17 Apr 2007 05:33:04 +0000 (05:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36193 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/BasicBlock.h
include/llvm/Function.h
include/llvm/Module.h

index 0a22f44b985bc3420543b61d758084b90ae7c571..53d2e4c841a511eaf408f6655f915e06ddf013df 100644 (file)
@@ -199,7 +199,7 @@ public:
   
   static unsigned getInstListOffset() {
     BasicBlock *Obj = 0;
-    return reinterpret_cast<unsigned>(&Obj->InstList);
+    return unsigned(reinterpret_cast<uintptr_t>(&Obj->InstList));
   }
 };
 
index 594b6efdc2ba63a0d5da1123eae1d7010e805f09..f78365085fba29eb63a5a2a614d281eb7a92f446 100644 (file)
@@ -246,11 +246,11 @@ public:
   
   static unsigned getBasicBlockListOffset() {
     Function *Obj = 0;
-    return reinterpret_cast<unsigned>(&Obj->BasicBlocks);
+    return unsigned(reinterpret_cast<uintptr_t>(&Obj->BasicBlocks));
   }
   static unsigned getArgumentListOffset() {
     Function *Obj = 0;
-    return reinterpret_cast<unsigned>(&Obj->ArgumentList);
+    return unsigned(reinterpret_cast<uintptr_t>(&Obj->ArgumentList));
   }
 };
 
index 1d82e2aad3d58ca564b23da9d5172e09cc4a95be..ecc9c0b8e200a97c125da23d7935162d378d9b13 100644 (file)
@@ -318,11 +318,11 @@ public:
 
   static unsigned getFunctionListOffset() {
     Module *Obj = 0;
-    return reinterpret_cast<unsigned>(&Obj->FunctionList);
+    return unsigned(reinterpret_cast<uintptr_t>(&Obj->FunctionList));
   }
   static unsigned getGlobalVariableListOffset() {
     Module *Obj = 0;
-    return reinterpret_cast<unsigned>(&Obj->GlobalList);
+    return unsigned(reinterpret_cast<uintptr_t>(&Obj->GlobalList));
   }
 };