aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2007-04-17 05:33:04 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2007-04-17 05:33:04 +0000
commiteb913b6b34a81b95ea5f692b710e5766526853c6 (patch)
treea94ccfd91d40a50825e55a99ff3030247a52f26d
parent18feb92e917a029b72a338e91b5b93f74d26f406 (diff)
downloadexternal_llvm-eb913b6b34a81b95ea5f692b710e5766526853c6.zip
external_llvm-eb913b6b34a81b95ea5f692b710e5766526853c6.tar.gz
external_llvm-eb913b6b34a81b95ea5f692b710e5766526853c6.tar.bz2
Fix build breakage on 64-bit systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36193 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/BasicBlock.h2
-rw-r--r--include/llvm/Function.h4
-rw-r--r--include/llvm/Module.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h
index 0a22f44..53d2e4c 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<unsigned>(&Obj->InstList);
+ return unsigned(reinterpret_cast<uintptr_t>(&Obj->InstList));
}
};
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index 594b6ef..f783650 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<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));
}
};
diff --git a/include/llvm/Module.h b/include/llvm/Module.h
index 1d82e2a..ecc9c0b 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<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));
}
};