diff options
| author | 2019-06-23 21:36:31 +0000 | |
|---|---|---|
| committer | 2019-06-23 21:36:31 +0000 | |
| commit | 23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch) | |
| tree | f7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h | |
| parent | sort previous; ok deraadt (diff) | |
| download | wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip | |
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h')
| -rw-r--r-- | gnu/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h b/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h index 6e6988ea4ad..f484540d8d3 100644 --- a/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h +++ b/gnu/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h @@ -30,8 +30,11 @@ class DwarfStringPool { StringMap<EntryTy, BumpPtrAllocator &> Pool; StringRef Prefix; unsigned NumBytes = 0; + unsigned NumIndexedStrings = 0; bool ShouldCreateSymbols; + StringMapEntry<EntryTy> &getEntryImpl(AsmPrinter &Asm, StringRef Str); + public: using EntryRef = DwarfStringPoolEntryRef; @@ -48,8 +51,15 @@ public: unsigned size() const { return Pool.size(); } + unsigned getNumIndexedStrings() const { return NumIndexedStrings; } + /// Get a reference to an entry in the string pool. EntryRef getEntry(AsmPrinter &Asm, StringRef Str); + + /// Same as getEntry, except that you can use EntryRef::getIndex to obtain a + /// unique ID of this entry (e.g., for use in indexed forms like + /// DW_FORM_strx). + EntryRef getIndexedEntry(AsmPrinter &Asm, StringRef Str); }; } // end namespace llvm |
