Use DW_AT_low_pc for a single entry point into a routine.
authorEric Christopher <echristo@apple.com>
Tue, 27 Mar 2012 18:35:54 +0000 (18:35 +0000)
committerEric Christopher <echristo@apple.com>
Tue, 27 Mar 2012 18:35:54 +0000 (18:35 +0000)
Fixes PR10105

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153524 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 84fc564f4e3dee60f8b802f093c2adef6295157e..6f15bfeb2b2f45f90b27080a6b619336287eb156 100644 (file)
@@ -555,9 +555,9 @@ CompileUnit *DwarfDebug::constructCompileUnit(const MDNode *N) {
   NewCU->addUInt(Die, dwarf::DW_AT_language, dwarf::DW_FORM_data2,
                  DIUnit.getLanguage());
   NewCU->addString(Die, dwarf::DW_AT_name, FN);
-  // Use DW_AT_entry_pc instead of DW_AT_low_pc/DW_AT_high_pc pair. This
-  // simplifies debug range entries.
-  NewCU->addUInt(Die, dwarf::DW_AT_entry_pc, dwarf::DW_FORM_addr, 0);
+  // 2.17.1 requires that we use DW_AT_low_pc for a single entry point
+  // into an entity.
+  NewCU->addUInt(Die, dwarf::DW_AT_low_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.
   if (Asm->MAI->doesDwarfRequireRelocationForSectionOffset())