summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
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/DwarfUnit.cpp
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/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index ae92b6aa6d2..18070462b4a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -1580,8 +1580,6 @@ void DwarfCompileUnit::createGlobalVariableDIE(DIGlobalVariable GV) {
unsigned PointerSize = Asm->getDataLayout().getPointerSize();
assert((PointerSize == 4 || PointerSize == 8) &&
"Add support for other sizes if necessary");
- const MCExpr *Expr =
- Asm->getObjFileLowering().getDebugThreadLocalSymbol(Sym);
// Based on GCC's support for TLS:
if (!DD->useSplitDwarf()) {
// 1) Start with a constNu of the appropriate pointer size
@@ -1589,10 +1587,12 @@ void DwarfCompileUnit::createGlobalVariableDIE(DIGlobalVariable GV) {
PointerSize == 4 ? dwarf::DW_OP_const4u : dwarf::DW_OP_const8u);
// 2) containing the (relocated) offset of the TLS variable
// within the module's TLS block.
- addExpr(Block, dwarf::DW_FORM_udata, Expr);
+ addExpr(Block, dwarf::DW_FORM_udata,
+ Asm->getObjFileLowering().getDebugThreadLocalSymbol(Sym));
} else {
addUInt(Block, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_const_index);
- addUInt(Block, dwarf::DW_FORM_udata, DU->getAddrPoolIndex(Expr));
+ addUInt(Block, dwarf::DW_FORM_udata,
+ DU->getAddrPoolIndex(Sym, /* TLS */ true));
}
// 3) followed by a custom OP to make the debugger do a TLS lookup.
addUInt(Block, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_push_tls_address);
OpenPOWER on IntegriCloud