Skip to content

Commit f22dc88

Browse files
[NFC] Address review feedback from PR #77004 (#77134)
Accidentally didn't commit the review feedback before merging the PR
1 parent f9aba82 commit f22dc88

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,8 @@ void DWARFVerifier::verifyDebugLineRows() {
944944
// row, do not verify the file index, this is a line table of an empty
945945
// file with an end_sequence, but the DWARF standard sets the file number
946946
// to 1 by default, otherwise verify file index.
947-
if (!(LineTable->Prologue.FileNames.size() == 0 &&
948-
LineTable->Rows.size() == 1) &&
947+
if ((LineTable->Prologue.FileNames.size() ||
948+
LineTable->Rows.size() != 1) &&
949949
!LineTable->hasFileAtIndex(Row.File)) {
950950
++NumDebugLineErrors;
951951
error() << ".debug_line["

llvm/test/tools/llvm-dwarfdump/verify-no-file.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# RUN: rm -rf %t && mkdir -p %t
2-
# RUN: yaml2obj %s -o %t/test.o
3-
# RUN: llvm-dwarfdump --debug-line --verify %t/test.o 2>&1 | FileCheck %s
1+
# RUN: yaml2obj %s -o %t.o
2+
# RUN: llvm-dwarfdump --debug-line --verify %t.o 2>&1 | FileCheck %s
43

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

0 commit comments

Comments
 (0)