diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-10-25 23:40:35 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-10-25 23:40:35 +0000 |
commit | 542e5f29b744223f1715390b263897901b5f9eb9 (patch) | |
tree | 3b7d720703f1aefd259bbaa49d6b266d37090d33 /llvm/lib/Bitcode/Reader | |
parent | fc69d322f2af7182c907d8270569a4487290441d (diff) | |
download | bcm5719-llvm-542e5f29b744223f1715390b263897901b5f9eb9.tar.gz bcm5719-llvm-542e5f29b744223f1715390b263897901b5f9eb9.zip |
Updated backpatching during object deserialization to support "smart"
pointers that employ unused bits in a pointer to store extra data.
llvm-svn: 43373
Diffstat (limited to 'llvm/lib/Bitcode/Reader')
-rw-r--r-- | llvm/lib/Bitcode/Reader/Deserialize.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/Deserialize.cpp b/llvm/lib/Bitcode/Reader/Deserialize.cpp index 3e16027839c..66df46ea23e 100644 --- a/llvm/lib/Bitcode/Reader/Deserialize.cpp +++ b/llvm/lib/Bitcode/Reader/Deserialize.cpp @@ -126,7 +126,9 @@ void Deserializer::BackpatchPointers() { assert (Entry.Ptr && "No pointer found for backpatch."); for (BPatchNode* N = Entry.Head; N != NULL; N = N->Next) - N->PtrRef = Entry.Ptr; + // Bitwise-OR in the pointer to support "smart" pointers that use + // unused bits to store extra data. + N->PtrRef |= reinterpret_cast<uintptr_t>(Entry.Ptr); Entry.Head = NULL; } |