summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h')
-rw-r--r--llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h b/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
index 72ee66e97d7..fc2b5ddd2d2 100644
--- a/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
+++ b/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
@@ -34,7 +34,10 @@ public:
: I(&I) {}
explicit operator bool() const { return I; }
- MCSymbol *getSymbol() const { return I->second.Symbol; }
+ MCSymbol *getSymbol() const {
+ assert(I->second.Symbol && "No symbol available!");
+ return I->second.Symbol;
+ }
unsigned getOffset() const { return I->second.Offset; }
unsigned getIndex() const { return I->second.Index; }
StringRef getString() const { return I->first(); }
OpenPOWER on IntegriCloud