22 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
24 {0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
44 for (
const auto &
Ref : Refs) {
55 reinterpret_cast<const TypeIndex *>(RefData.data()),
Ref.Count);
58 if (TI.isSimple() || TI.isNoneType() || TI.toArrayIndex() >= Prev.size()) {
59 const uint8_t *IndexBytes =
reinterpret_cast<const uint8_t *
>(&TI);
62 BytesToHash = Prev[TI.toArrayIndex()].Hash;
71 auto TrailingBytes = RecordData.
drop_front(Off);
void discoverTypeIndices(ArrayRef< uint8_t > RecordData, SmallVectorImpl< TiReference > &Refs)
ArrayRef< T > take_front(size_t N=1) const
Return a copy of *this with only the first N elements.
This class represents lattice values for constants.
A locally hashed type represents a straightforward hash code of a serialized record.
A class that wrap the SHA1 algorithm.
void init()
Reinitialize the internal state.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef take_back(size_t N=1) const
Return a StringRef equal to 'this' but with only the last N elements remaining.
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
static LocallyHashedType hashType(ArrayRef< uint8_t > RecordData)
Given a type, compute its local hash.
The access may reference the value stored in memory.
StringRef final()
Return a reference to the current raw 160-bits SHA1 for the digested data since the last call to init...
hash_code hash_value(const APFloat &Arg)
See friend declarations above.
A globally hashed type represents a hash value that is sufficient to uniquely identify a record acros...
void update(ArrayRef< uint8_t > Data)
Digest more data.
static std::array< uint8_t, 8 > TombstoneHash
static std::array< uint8_t, 8 > EmptyHash
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
An opaque object representing a hash code.
ArrayRef< T > slice(size_t N, size_t M) const
slice(n, m) - Chop off the first N elements of the array, and keep M elements in the array...
static GloballyHashedType hashType(ArrayRef< uint8_t > RecordData, ArrayRef< GloballyHashedType > PreviousTypes, ArrayRef< GloballyHashedType > PreviousIds)
Given a sequence of bytes representing a record, compute a global hash for this record.
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
ArrayRef< uint8_t > RecordData