[PATCH] D153275: [DebugInfo] Fix emission of empty debug_names for Apple

Felipe de Azevedo Piovezan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 11:29:46 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG8af224d52cad: [DebugInfo] Fix emission of empty debug_names for Apple (authored by fdeazeve).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153275/new/

https://reviews.llvm.org/D153275

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  llvm/test/DebugInfo/accel-tables-apple.ll


Index: llvm/test/DebugInfo/accel-tables-apple.ll
===================================================================
--- llvm/test/DebugInfo/accel-tables-apple.ll
+++ llvm/test/DebugInfo/accel-tables-apple.ll
@@ -1,8 +1,9 @@
 ; Verify the emission of accelerator tables for nameTableKind: Apple
 ; REQUIRES: x86-registered-target
 
-; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj < %S/Inputs/name-table-kind-apple-5.ll \
-; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=DEBUG_NAMES %s
+; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj -o %t.d5.o < %S/Inputs/name-table-kind-apple-5.ll
+; RUN:   llvm-readobj --sections %t.d5.o | FileCheck --check-prefix=DEBUG_NAMES %s
+; RUN:   llvm-dwarfdump --debug-names %t.d5.o | FileCheck --check-prefix=COUNT_DEBUG_NAMES %s
 
 ; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj < %S/Inputs/name-table-kind-apple-4.ll \
 ; RUN:   | llvm-readobj --sections - | FileCheck --check-prefix=APPLE %s
@@ -18,3 +19,5 @@
 ; DEBUG_NAMES: debug_names
 ; DEBUG_NAMES-NOT: apple_names
 ; DEBUG_NAMES-NOT: pubnames
+
+; COUNT_DEBUG_NAMES: Name count: 4
Index: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -494,6 +494,7 @@
 void DwarfDebug::addSubprogramNames(const DICompileUnit &CU,
                                     const DISubprogram *SP, DIE &Die) {
   if (getAccelTableKind() != AccelTableKind::Apple &&
+      CU.getNameTableKind() != DICompileUnit::DebugNameTableKind::Apple &&
       CU.getNameTableKind() == DICompileUnit::DebugNameTableKind::None)
     return;
 
@@ -3538,6 +3539,7 @@
     return;
 
   if (getAccelTableKind() != AccelTableKind::Apple &&
+      CU.getNameTableKind() != DICompileUnit::DebugNameTableKind::Apple &&
       CU.getNameTableKind() != DICompileUnit::DebugNameTableKind::Default)
     return;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153275.532999.patch
Type: text/x-patch
Size: 1960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230620/63e1bc8e/attachment.bin>


More information about the llvm-commits mailing list