From aa059b114dfee9e1c5b05d09371bdbbf4600fd10 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 31 Oct 2007 22:42:03 +0000 Subject: 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 --- lib/Bitcode/Reader/Deserialize.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Bitcode') 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& 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. -- cgit v1.1