diff options
author | Paul Robinson <paul_robinson@playstation.sony.com> | 2015-03-04 20:55:11 +0000 |
---|---|---|
committer | Paul Robinson <paul_robinson@playstation.sony.com> | 2015-03-04 20:55:11 +0000 |
commit | 78cc0821f098ba1ce26f4c1fe143c0d4f8a8250f (patch) | |
tree | 1109ef3025f5d91ef871c393c330be82cb5d85cb /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | |
parent | e8effe1edb7c1d5d798eed5a67d76b4f67983cab (diff) | |
download | bcm5719-llvm-78cc0821f098ba1ce26f4c1fe143c0d4f8a8250f.tar.gz bcm5719-llvm-78cc0821f098ba1ce26f4c1fe143c0d4f8a8250f.zip |
Support standard DWARF TLS opcode; Darwin and PS4 use it.
Differential Revision: http://reviews.llvm.org/D8018
llvm-svn: 231286
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index dcc5fe411a7..5ec83c2480d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -164,8 +164,10 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) { addUInt(*Loc, dwarf::DW_FORM_udata, DD->getAddressPool().getIndex(Sym, /* TLS */ true)); } - // 3) followed by a custom OP to make the debugger do a TLS lookup. - addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_GNU_push_tls_address); + // 3) followed by an OP to make the debugger do a TLS lookup. + addUInt(*Loc, dwarf::DW_FORM_data1, + DD->useGNUTLSOpcode() ? dwarf::DW_OP_GNU_push_tls_address + : dwarf::DW_OP_form_tls_address); } else { DD->addArangeLabel(SymbolCU(this, Sym)); addOpAddress(*Loc, Sym); |