From eb913b6b34a81b95ea5f692b710e5766526853c6 Mon Sep 17 00:00:00 2001 From: Jeff Cohen Date: Tue, 17 Apr 2007 05:33:04 +0000 Subject: [PATCH] Fix build breakage on 64-bit systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36193 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/BasicBlock.h | 2 +- include/llvm/Function.h | 4 ++-- include/llvm/Module.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 0a22f44b985..53d2e4c841a 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -199,7 +199,7 @@ public: static unsigned getInstListOffset() { BasicBlock *Obj = 0; - return reinterpret_cast(&Obj->InstList); + return unsigned(reinterpret_cast(&Obj->InstList)); } }; diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 594b6efdc2b..f78365085fb 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -246,11 +246,11 @@ public: static unsigned getBasicBlockListOffset() { Function *Obj = 0; - return reinterpret_cast(&Obj->BasicBlocks); + return unsigned(reinterpret_cast(&Obj->BasicBlocks)); } static unsigned getArgumentListOffset() { Function *Obj = 0; - return reinterpret_cast(&Obj->ArgumentList); + return unsigned(reinterpret_cast(&Obj->ArgumentList)); } }; diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 1d82e2aad3d..ecc9c0b8e20 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -318,11 +318,11 @@ public: static unsigned getFunctionListOffset() { Module *Obj = 0; - return reinterpret_cast(&Obj->FunctionList); + return unsigned(reinterpret_cast(&Obj->FunctionList)); } static unsigned getGlobalVariableListOffset() { Module *Obj = 0; - return reinterpret_cast(&Obj->GlobalList); + return unsigned(reinterpret_cast(&Obj->GlobalList)); } };