summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2013-07-02 18:47:09 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2013-07-02 18:47:09 +0000
commit2b6fc8d613c50dda7f60961a0c5a19b690b450b9 (patch)
treeaf16205fc05b686b5173b34f1ade38b0df5246eb /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent8b3d22664e58e32095edfa58dfc3ce4ce2b7fd6f (diff)
downloadbcm5719-llvm-2b6fc8d613c50dda7f60961a0c5a19b690b450b9.tar.gz
bcm5719-llvm-2b6fc8d613c50dda7f60961a0c5a19b690b450b9.zip
[DebugInfo] Allow getDebugThreadLocalSymbol to return MCExpr
This allows getDebugThreadLocalSymbol to return a generic MCExpr instead of just a MCSymbolRefExpr. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185460
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 398718dc175..e8462323704 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -1358,7 +1358,7 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
unsigned PointerSize = Asm->getDataLayout().getPointerSize();
assert((PointerSize == 4 || PointerSize == 8) &&
"Add support for other sizes if necessary");
- const MCSymbolRefExpr *Ref =
+ const MCExpr *Expr =
Asm->getObjFileLowering().getDebugThreadLocalSymbol(Sym);
// Based on GCC's support for TLS:
if (!DD->useSplitDwarf()) {
@@ -1366,10 +1366,10 @@ void CompileUnit::createGlobalVariableDIE(const MDNode *N) {
addUInt(Block, 0, dwarf::DW_FORM_data1,
PointerSize == 4 ? dwarf::DW_OP_const4u : dwarf::DW_OP_const8u);
// 2) containing the (relocated) address of the TLS variable
- addExpr(Block, 0, dwarf::DW_FORM_udata, Ref);
+ addExpr(Block, 0, dwarf::DW_FORM_udata, Expr);
} else {
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_const_index);
- addUInt(Block, 0, dwarf::DW_FORM_udata, DU->getAddrPoolIndex(Ref));
+ addUInt(Block, 0, dwarf::DW_FORM_udata, DU->getAddrPoolIndex(Expr));
}
// 3) followed by a custom OP to tell the debugger about TLS (presumably)
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_lo_user);
OpenPOWER on IntegriCloud