20 auto &
Entry =
I.first->second;
21 if (
I.second || !
Entry.isIndexed()) {
22 Entry.Index = NumEntries++;
23 Entry.Offset = CurrentEndOffset;
24 Entry.Symbol =
nullptr;
25 CurrentEndOffset += S.
size() + 1;
37 return InsertResult.first->getKey();
40 std::vector<DwarfStringPoolEntryRef>
42 std::vector<DwarfStringPoolEntryRef> Result;
43 Result.reserve(Strings.
size());
44 for (
const auto &
E : Strings)
45 if (
E.getValue().isIndexed())
46 Result.emplace_back(
E,
true);
DwarfStringPoolEntryRef getEntry(StringRef S)
This class represents lattice values for constants.
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
static constexpr unsigned NotIndexed
LLVM_NODISCARD size_t size() const
size - Get the string size.
Data for a string pool entry.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
std::vector< DwarfStringPoolEntryRef > getEntriesForEmission() const
Return the list of strings to be emitted.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
void sort(IteratorTy Start, IteratorTy End)
unsigned getIndex() const
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
String pool entry reference.
StringRef internString(StringRef S)
Get permanent storage for S (but do not necessarily emit S in the output section).
StringRef - Represent a constant reference to a string, i.e.