summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-08-31 23:50:19 +0000
committerDevang Patel <dpatel@apple.com>2010-08-31 23:50:19 +0000
commitea63639da509e808968839067b28ac159f979c1c (patch)
treeb822f74b419b9220c1b8cfb018ec987e0d167633 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parenteb5a307259db831cde1786fd2d3fb6613fc571eb (diff)
downloadbcm5719-llvm-ea63639da509e808968839067b28ac159f979c1c.tar.gz
bcm5719-llvm-ea63639da509e808968839067b28ac159f979c1c.zip
Use absolute label for DW_AT_stmt_list if a target does not prefer offset here.
This patch was developed on top of original patch by Artur Pietrek. llvm-svn: 112678
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index eeae8a33f42..6edce5a2cd9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1815,7 +1815,11 @@ void DwarfDebug::constructCompileUnit(const MDNode *N) {
addUInt(Die, dwarf::DW_AT_entry_pc, dwarf::DW_FORM_addr, 0);
// DW_AT_stmt_list is a offset of line number information for this
// compile unit in debug_line section.
- addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
+ if (Asm->MAI->doesDwarfUsesAbsoluteLabelForStmtList())
+ addLabel(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_addr,
+ Asm->GetTempSymbol("section_line"));
+ else
+ addUInt(Die, dwarf::DW_AT_stmt_list, dwarf::DW_FORM_data4, 0);
if (!Dir.empty())
addString(Die, dwarf::DW_AT_comp_dir, dwarf::DW_FORM_string, Dir);
OpenPOWER on IntegriCloud