[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
Mon Jun 19 08:35:48 PDT 2023
fdeazeve updated this revision to Diff 532677.
fdeazeve added a comment.
Trying to add context to the review
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;
@@ -3539,6 +3540,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.532677.patch
Type: text/x-patch
Size: 1960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230619/36502170/attachment.bin>
More information about the llvm-commits
mailing list