mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 20:32:19 +00:00
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
This commit is contained in:
parent
0c8a13b510
commit
6fd11c53e9
@ -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) {
|
||||
|
@ -32,6 +32,7 @@ class Serializer {
|
||||
|
||||
public:
|
||||
Serializer(BitstreamWriter& stream, unsigned BlockID = 0);
|
||||
|
||||
~Serializer();
|
||||
|
||||
template <typename T>
|
||||
|
Loading…
Reference in New Issue
Block a user