diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AddressPool.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AddressPool.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AddressPool.h b/llvm/lib/CodeGen/AsmPrinter/AddressPool.h index d0c9b0d8577..3058fed33fd 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AddressPool.h +++ b/llvm/lib/CodeGen/AsmPrinter/AddressPool.h @@ -26,8 +26,11 @@ class AddressPool { AddressPoolEntry(unsigned Number, bool TLS) : Number(Number), TLS(TLS) {} }; DenseMap<const MCSymbol *, AddressPoolEntry> Pool; + bool HasBeenUsed; public: + AddressPool() : HasBeenUsed(false) {} + /// \brief Returns the index into the address pool with the given /// label/symbol. unsigned getIndex(const MCSymbol *Sym, bool TLS = false); @@ -35,6 +38,10 @@ public: void emit(AsmPrinter &Asm, const MCSection *AddrSection); bool isEmpty() { return Pool.empty(); } + + bool hasBeenUsed() const { return HasBeenUsed; } + + void resetUsedFlag() { HasBeenUsed = false; } }; } #endif |