32 "Invalid hash table signature");
33 if (Header->HashVersion != 1 && Header->HashVersion != 2)
35 "Unsupported hash version");
49 "Invalid hash table byte length"));
56const codeview::DebugStringTableSubsectionRef &
66 if (
auto EC = Reader.
readArray(IDs, *HashCount)) {
69 "Could not read bucket array"));
88 if (
auto EC = readHeader(SectionReader))
91 std::tie(SectionReader, Reader) = Reader.
split(Header->ByteSize);
92 if (
auto EC = readStrings(SectionReader))
97 if (
auto EC = readHashTable(Reader))
100 std::tie(SectionReader, Reader) = Reader.
split(
sizeof(
uint32_t));
101 if (
auto EC = readEpilogue(SectionReader))
109 return Strings.getString(
ID);
115 size_t Count = IDs.size();
117 for (
size_t I = 0;
I <
Count; ++
I) {
129 return ExpectedStr.takeError();
131 if (*ExpectedStr == Str)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Provides read only access to a subclass of BinaryStream.
LLVM_ABI Error readStreamRef(BinaryStreamRef &Ref)
Read the entire remainder of the underlying stream into Ref.
Error readObject(const T *&Dest)
Get a pointer to an object of type T from the underlying stream, as if by memcpy, and store the resul...
Error readInteger(T &Dest)
Read an integer of the specified endianness into Dest and update the stream's offset.
uint64_t bytesRemaining() const
LLVM_ABI std::pair< BinaryStreamReader, BinaryStreamReader > split(uint64_t Offset) const
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
FixedStreamArray is similar to VarStreamArray, except with each record having a fixed-length.
StringRef - Represent a constant reference to a string, i.e.
LLVM_ABI Error initialize(BinaryStreamRef Contents)
LLVM_ABI const codeview::DebugStringTableSubsectionRef & getStringTable() const
LLVM_ABI uint32_t getSignature() const
LLVM_ABI uint32_t getNameCount() const
LLVM_ABI Expected< uint32_t > getIDForString(StringRef Str) const
LLVM_ABI Error reload(BinaryStreamReader &Reader)
LLVM_ABI Expected< StringRef > getStringForID(uint32_t ID) const
LLVM_ABI uint32_t getByteSize() const
LLVM_ABI uint32_t getHashVersion() const
LLVM_ABI FixedStreamArray< support::ulittle32_t > name_ids() const
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
LLVM_ABI uint32_t hashStringV1(StringRef Str)
const uint32_t PDBStringTableSignature
LLVM_ABI uint32_t hashStringV2(StringRef Str)
detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t
This is an optimization pass for GlobalISel generic memory operations.
Error joinErrors(Error E1, Error E2)
Concatenate errors.
FunctionAddr VTableAddr Count
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.