[llvm-commits] [llvm] r43425 - /llvm/trunk/lib/Bitcode/Reader/Deserialize.cpp
Ted Kremenek
kremenek at apple.com
Sun Oct 28 16:38:41 PDT 2007
Author: kremenek
Date: Sun Oct 28 18:38:38 2007
New Revision: 43425
URL: http://llvm.org/viewvc/llvm-project?rev=43425&view=rev
Log:
Fixed assertion in Deserializer::~Deserializer that checks for
pointers that were not backpatched (previously checked the wrong invariant).
Modified:
llvm/trunk/lib/Bitcode/Reader/Deserialize.cpp
Modified: llvm/trunk/lib/Bitcode/Reader/Deserialize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/Deserialize.cpp?rev=43425&r1=43424&r2=43425&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/Deserialize.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/Deserialize.cpp Sun Oct 28 18:38:38 2007
@@ -22,8 +22,12 @@
Deserializer::~Deserializer() {
assert (RecIdx >= Record.size() &&
"Still scanning bitcode record when deserialization completed.");
-
- assert (FreeList == NULL && "Some pointers were not backpatched.");
+
+#ifdef NDEBUG
+ for (MapTy::iterator I=BPatchMap.begin(), E=BPatchMap.end(); I!=E; ++I)
+ assert (I->second.hasFinalPtr() &&
+ "Some pointers were not backpatched.");
+#endif
}
More information about the llvm-commits
mailing list