16 auto &Entry =
I.first->second;
17 if (
I.second || !Entry.isIndexed()) {
18 Entry.Index = NumEntries++;
19 Entry.Offset = CurrentEndOffset;
20 Entry.Symbol =
nullptr;
21 CurrentEndOffset += S.
size() + 1;
29 auto InsertResult = Strings.
insert({S, Entry});
30 return InsertResult.first->getKey();
33std::vector<DwarfStringPoolEntryRef>
35 std::vector<DwarfStringPoolEntryRef> Result;
36 Result.reserve(Strings.
size());
37 for (
const auto &
E : Strings)
38 if (
E.getValue().isIndexed())
39 Result.emplace_back(
E);
42 return A.getIndex() <
B.getIndex();
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
DwarfStringPoolEntryRef: Dwarf string pool entry reference.
DwarfStringPoolEntryRef getEntry(StringRef S)
std::vector< DwarfStringPoolEntryRef > getEntriesForEmission() const
Return the list of strings to be emitted.
StringRef internString(StringRef S)
Get permanent storage for S (but do not necessarily emit S in the output section).
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
StringRef - Represent a constant reference to a string, i.e.
constexpr size_t size() const
size - Get the string size.
This is an optimization pass for GlobalISel generic memory operations.
void sort(IteratorTy Start, IteratorTy End)
Data for a string pool entry.
static constexpr unsigned NotIndexed