Go to the documentation of this file.
74 static const std::pair<uint32_t, uint32_t> StringsToBuckets[] = {
115 {13453488, 26906975},
116 {20180232, 40360463},
117 {30270348, 60540695},
118 {45405522, 90811043},
119 {68108283, 136216565},
120 {102162424, 204324848},
121 {153243637, 306487273},
122 {229865455, 459730910},
123 {344798183, 689596366},
124 {517197275, 1034394550},
125 {775795913, 1551591826},
126 {1163693870, 2327387740}};
130 return Entry->second;
133 uint32_t PDBStringTableBuilder::calculateHashTableSize()
const {
144 Size += calculateHashTableSize();
151 this->Strings = Strings;
160 if (
auto EC =
Writer.writeObject(
H))
177 if (
auto EC =
Writer.writeInteger(BucketCount))
179 std::vector<ulittle32_t> Buckets(BucketCount);
181 for (
auto &Pair : Strings) {
188 if (Buckets[Slot] != 0)
213 if (
auto EC = writeHeader(SectionWriter))
216 std::tie(SectionWriter,
Writer) =
217 Writer.split(Strings.calculateSerializedSize());
218 if (
auto EC = writeStrings(SectionWriter))
221 std::tie(SectionWriter,
Writer) =
Writer.split(calculateHashTableSize());
222 if (
auto EC = writeHashTable(SectionWriter))
226 if (
auto EC = writeEpilogue(SectionWriter))
This is an optimization pass for GlobalISel generic memory operations.
uint32_t calculateSerializedSize() const override
StringRef getStringForId(uint32_t Id) const
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
Provides write only access to a subclass of WritableBinaryStream.
uint32_t insert(StringRef S)
static ErrorSuccess success()
Create a success value.
static uint32_t computeBucketCount(uint32_t NumStrings)
const_iterator end(StringRef path)
Get end iterator over path.
Represents a read-write view of a CodeView string table.
uint32_t lookupKeyToStorageKey(StringRef S)
Adapter to write values to a stream in a particular byte order.
Error commit(BinaryStreamWriter &Writer) const
const uint32_t PDBStringTableSignature
uint32_t insert(StringRef S)
Function object to check whether the first component of a std::pair compares less than the first comp...
StringRef getStringForId(uint32_t Id) const
StringRef storageKeyToLookupKey(uint32_t Offset) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
uint32_t getIdForString(StringRef S) const
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
void setStrings(const codeview::DebugStringTableSubsection &Strings)
uint32_t calculateSerializedSize() const
uint32_t hashLookupKey(StringRef S) const
Lightweight error class with error context and mandatory checking.
PDBStringTableBuilder * Table
Error commit(BinaryStreamWriter &Writer) const override
uint32_t getIdForString(StringRef S) const
uint32_t hashStringV1(StringRef Str)