summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-02-15 19:34:03 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-02-15 19:34:03 +0000
commitf1a6dea82c6b702842af75f2d98e89700bdd800d (patch)
treeaae588144d8372734ead67b98269d2a9fd177a78 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
parent90181d6180cdfe050dd0cff470499e26b3d61dd5 (diff)
downloadbcm5719-llvm-f1a6dea82c6b702842af75f2d98e89700bdd800d.tar.gz
bcm5719-llvm-f1a6dea82c6b702842af75f2d98e89700bdd800d.zip
DebugInfo: Deduplicate entries in the fission address table
This broke in r185459 while TLS support was being generalized to handle non-symbol TLS representations. I thought about/tried having an enum rather than a bool to track the TLS-ness of the address table entry, but namespaces and naming seemed more hassle than it was worth for only one caller that needed to specify this. llvm-svn: 201469
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 9cc12108e8f..c1d78587121 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -244,10 +244,15 @@ class DwarfFile {
unsigned NextStringPoolNumber;
std::string StringPref;
+ struct AddressPoolEntry {
+ unsigned Number;
+ bool TLS;
+ AddressPoolEntry(unsigned Number, bool TLS) : Number(Number), TLS(TLS) {}
+ };
// Collection of addresses for this unit and assorted labels.
// A Symbol->unsigned mapping of addresses used by indirect
// references.
- typedef DenseMap<const MCExpr *, unsigned> AddrPool;
+ typedef DenseMap<const MCSymbol *, AddressPoolEntry> AddrPool;
AddrPool AddressPool;
unsigned NextAddrPoolNumber;
@@ -303,8 +308,7 @@ public:
/// \brief Returns the index into the address pool with the given
/// label/symbol.
- unsigned getAddrPoolIndex(const MCExpr *Sym);
- unsigned getAddrPoolIndex(const MCSymbol *Sym);
+ unsigned getAddrPoolIndex(const MCSymbol *Sym, bool TLS = false);
/// \brief Returns the address pool.
AddrPool *getAddrPool() { return &AddressPool; }
OpenPOWER on IntegriCloud