Skip to content

[NFC] Address review feedback from PR #77004 #77134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,8 @@ void DWARFVerifier::verifyDebugLineRows() {
// row, do not verify the file index, this is a line table of an empty
// file with an end_sequence, but the DWARF standard sets the file number
// to 1 by default, otherwise verify file index.
if (!(LineTable->Prologue.FileNames.size() == 0 &&
LineTable->Rows.size() == 1) &&
if ((LineTable->Prologue.FileNames.size() ||
LineTable->Rows.size() != 1) &&
!LineTable->hasFileAtIndex(Row.File)) {
++NumDebugLineErrors;
error() << ".debug_line["
Expand Down
5 changes: 2 additions & 3 deletions llvm/test/tools/llvm-dwarfdump/verify-no-file.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: yaml2obj %s -o %t/test.o
# RUN: llvm-dwarfdump --debug-line --verify %t/test.o 2>&1 | FileCheck %s
# RUN: yaml2obj %s -o %t.o
# RUN: llvm-dwarfdump --debug-line --verify %t.o 2>&1 | FileCheck %s

# CHECK-NOT: error: .debug_line[0x{{[0-9a-f]+}}][0] has invalid file index 1 (valid values are [1,0]):
--- !mach-o
Expand Down