aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/Deserialize.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-11-05 18:13:03 +0000
committerTed Kremenek <kremenek@apple.com>2007-11-05 18:13:03 +0000
commit6fd11c53e9d17c4dec9945bbd21b30b7a84d3f6b (patch)
tree6b02d0ef4dcff6b42c91d658d400eee6975358fd /include/llvm/Bitcode/Deserialize.h
parent0c8a13b5107eb41d3c62d7b0db1bd17fa5549368 (diff)
Fixed bug where tombstone key and empty key for DenseMap used for
pointer backpatching in deserializer were improperly created and resulted in an assertion failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/Deserialize.h')
-rw-r--r--include/llvm/Bitcode/Deserialize.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Bitcode/Deserialize.h b/include/llvm/Bitcode/Deserialize.h
index 332a842d28..2454dca565 100644
--- a/include/llvm/Bitcode/Deserialize.h
+++ b/include/llvm/Bitcode/Deserialize.h
@@ -56,13 +56,14 @@ class Deserializer {
public:
BPKey(unsigned PtrId) : Raw(PtrId << 1) { assert (PtrId > 0); }
+ BPKey(unsigned code, unsigned) : Raw(code) {}
void MarkFinal() { Raw |= 0x1; }
bool hasFinalPtr() const { return Raw & 0x1 ? true : false; }
unsigned getID() const { return Raw >> 1; }
- static inline BPKey getEmptyKey() { return 0; }
- static inline BPKey getTombstoneKey() { return 1; }
+ static inline BPKey getEmptyKey() { return BPKey(0,0); }
+ static inline BPKey getTombstoneKey() { return BPKey(1,0); }
static inline unsigned getHashValue(const BPKey& K) { return K.Raw & ~0x1; }
static bool isEqual(const BPKey& K1, const BPKey& K2) {