summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h b/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h
index 9f32b98e2b3..ba0d595c140 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.h
@@ -37,13 +37,20 @@ public:
/// \brief Returns an entry into the string pool with the given
/// string text.
- MCSymbol *getSymbol(AsmPrinter &Asm, StringRef Str);
+ MCSymbol *getSymbol(AsmPrinter &Asm, StringRef Str) {
+ return getEntry(Asm, Str).first;
+ }
/// \brief Returns the index into the string pool with the given
/// string text.
- unsigned getIndex(AsmPrinter &Asm, StringRef Str);
+ unsigned getIndex(AsmPrinter &Asm, StringRef Str) {
+ return getEntry(Asm, Str).second;
+ }
bool empty() const { return Pool.empty(); }
+
+private:
+ std::pair<MCSymbol *, unsigned> &getEntry(AsmPrinter &Asm, StringRef Str);
};
}
#endif
OpenPOWER on IntegriCloud