Skip to content

Commit df8c90f

Browse files
Kevin Freikevinfrei
Kevin Frei
authored andcommitted
Imply --verify instea of warn, better error message
1 parent b9362bc commit df8c90f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,7 @@ void DWARFVerifier::summarize() {
20402040
std::error_code EC;
20412041
raw_fd_ostream JsonStream(DumpOpts.JsonSummaryFile, EC, sys::fs::OF_Text);
20422042
if (EC) {
2043-
error() << "error opening aggregate error json file '"
2043+
error() << "unable to open json summary file '"
20442044
<< DumpOpts.JsonSummaryFile << "' for writing: " << EC.message()
20452045
<< '\n';
20462046
return;

llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,10 +840,10 @@ int main(int argc, char **argv) {
840840
"-verbose is currently not supported";
841841
return 1;
842842
}
843-
if (!Verify && ErrorDetails != Unspecified)
844-
WithColor::warning() << "-error-detail has no affect without -verify";
845-
if (!Verify && !JsonSummaryFile.empty())
846-
WithColor::warning() << "-json-summary-file has no affect without -verify";
843+
// -error-detail and -json-summary-file both imply -verify
844+
if (ErrorDetails != Unspecified || !JsonSummaryFile.empty()) {
845+
Verify = true;
846+
}
847847

848848
std::error_code EC;
849849
ToolOutputFile OutputFile(OutputFilename, EC, sys::fs::OF_TextWithCRLF);

0 commit comments

Comments
 (0)