aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-10-31 22:42:03 +0000
committerTed Kremenek <kremenek@apple.com>2007-10-31 22:42:03 +0000
commitaa059b114dfee9e1c5b05d09371bdbbf4600fd10 (patch)
tree93f9277b2fa45d14cc6b67e1ce2998c62e474a06 /lib
parentd1844ddf53417088bb3a07fb020d5d3fd1438548 (diff)
downloadexternal_llvm-aa059b114dfee9e1c5b05d09371bdbbf4600fd10.zip
external_llvm-aa059b114dfee9e1c5b05d09371bdbbf4600fd10.tar.gz
external_llvm-aa059b114dfee9e1c5b05d09371bdbbf4600fd10.tar.bz2
constified several pointer arguments for methods in the Deserializer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Bitcode/Reader/Deserialize.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bitcode/Reader/Deserialize.cpp b/lib/Bitcode/Reader/Deserialize.cpp
index 4b58cf4..9bc0f15 100644
--- a/lib/Bitcode/Reader/Deserialize.cpp
+++ b/lib/Bitcode/Reader/Deserialize.cpp
@@ -98,9 +98,9 @@ void Deserializer::ReadCStr(std::vector<char>& buff, bool isNullTerm) {
buff.push_back('\0');
}
-void Deserializer::RegisterPtr(unsigned PtrId,void* Ptr) {
+void Deserializer::RegisterPtr(unsigned PtrId, const void* Ptr) {
BPatchEntry& E = BPatchMap[PtrId];
- assert (E.hasFinalPtr() && "Pointer already registered.");
+ assert (!E.hasFinalPtr() && "Pointer already registered.");
E.setFinalPtr(FreeList,Ptr);
}
@@ -145,7 +145,7 @@ uintptr_t Deserializer::ReadInternalRefPtr() {
return E.getFinalPtr();
}
-void Deserializer::BPatchEntry::setFinalPtr(BPNode*& FreeList, void* P) {
+void Deserializer::BPatchEntry::setFinalPtr(BPNode*& FreeList, const void* P) {
assert (!hasFinalPtr());
// Perform backpatching.