diff options
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 | ||||
-rw-r--r-- | test/DebugInfo/2010-04-25-CU-entry_pc.ll (renamed from test/DebugInfo/2010-03-22-CU-HighLow.ll) | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c31aec1759..3ce0711a52 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1734,9 +1734,9 @@ void DwarfDebug::constructCompileUnit(MDNode *N) { addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data1, DIUnit.getLanguage()); addString(Die, dwarf::DW_AT_name, dwarf::DW_FORM_string, FN); - addLabel(Die, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, TextSectionSym); - addLabel(Die, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr, - Asm->GetTempSymbol("text_end")); + // Use DW_AT_entry_pc instead of DW_AT_low_pc/DW_AT_high_pc pair. This + // simplifies debug range entries. + addUInt(Die, dwarf::DW_AT_entry_pc, dwarf::DW_FORM_data4, 0); // DW_AT_stmt_list is a offset of line number information for this // compile unit in debug_line section. It is always zero when only one // compile unit is emitted in one object file. diff --git a/test/DebugInfo/2010-03-22-CU-HighLow.ll b/test/DebugInfo/2010-04-25-CU-entry_pc.ll index 42c25e4711..de099b6b9c 100644 --- a/test/DebugInfo/2010-03-22-CU-HighLow.ll +++ b/test/DebugInfo/2010-04-25-CU-entry_pc.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s | grep low_pc | count 2 +; RUN: llc < %s | grep entry_pc | count 2 @i = global i32 1 ; <i32*> [#uses=0] !llvm.dbg.gv = !{!0} |