Skip to content

Commit 2a753e0

Browse files
authored
Merge pull request #6564 from apple/🍒/navy/9f8678b38cd5
[DWARFLinker] Honor verbose flag for input verification
2 parents 67e69d5 + 894d63a commit 2a753e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

llvm/lib/DWARFLinker/DWARFLinker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2837,8 +2837,9 @@ Error DWARFLinker::cloneModuleUnit(LinkContext &Context, RefModuleUnit &Unit,
28372837
bool DWARFLinker::verify(const DWARFFile &File) {
28382838
assert(File.Dwarf);
28392839

2840+
raw_ostream &os = Options.Verbose ? errs() : nulls();
28402841
DIDumpOptions DumpOpts;
2841-
if (!File.Dwarf->verify(llvm::outs(), DumpOpts.noImplicitRecursion())) {
2842+
if (!File.Dwarf->verify(os, DumpOpts.noImplicitRecursion())) {
28422843
reportWarning("input verification failed", File);
28432844
return false;
28442845
}

llvm/test/tools/dsymutil/X86/verify.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
# RUN: dsymutil -verify-dwarf=input -verbose -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefix=QUIET-INPUT-FAIL
1717
# RUN: dsymutil -verify-dwarf=none -verbose -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefixes=QUIET-SUCCESS
1818
# RUN: not dsymutil -verify-dwarf=bogus -verbose -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefixes=BOGUS
19-
# RUN: not dsymutil -verify-dwarf=all -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefixes=QUIET-OUTPUT-FAIL,QUIET-INPUT-FAIL,VERBOSE-INPUT-FAIL
19+
# RUN: not dsymutil -verify-dwarf=all -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefixes=QUIET-OUTPUT-FAIL,QUIET-INPUT-FAIL
20+
# RUN: not dsymutil -verify-dwarf=all -verbose -oso-prepend-path=%p/../Inputs -y %s -o %t 2>&1 | FileCheck %s --check-prefixes=VERBOSE-INPUT-FAIL
2021

2122
# VERBOSE-INPUT-FAIL-DAG: error: Abbreviation declaration contains multiple DW_AT_language attributes.
2223
# QUIET-INPUT-FAIL-DAG: warning: input verification failed

0 commit comments

Comments
 (0)