commit | a83e6bc246410644cd17f34df93746d69abbfffc | [log] [tgz] |
---|---|---|
author | Ted Kremenek <kremenek@apple.com> | Thu Oct 25 18:42:52 2007 +0000 |
committer | Ted Kremenek <kremenek@apple.com> | Thu Oct 25 18:42:52 2007 +0000 |
tree | a427be93f9ac16a512ae396fb67e4da0ec2a981c | |
parent | 5a381083745cba01cdd49558d0f416989eb943d2 [diff] [blame] |
Added special treatment of serializing NULL pointers. llvm-svn: 43357
diff --git a/llvm/lib/Bitcode/Reader/Deserialize.cpp b/llvm/lib/Bitcode/Reader/Deserialize.cpp index febb2d7..d1d6ef0 100644 --- a/llvm/lib/Bitcode/Reader/Deserialize.cpp +++ b/llvm/lib/Bitcode/Reader/Deserialize.cpp
@@ -103,6 +103,11 @@ void Deserializer::ReadPtr(void*& PtrRef) { unsigned PtrId = ReadInt(); + if (PtrId == 0) { + PtrRef = NULL; + return; + } + BPatchEntry& E = BPatchMap[PtrId]; if (E.Ptr == NULL) {