Skip to content

Commit d5e65a5

Browse files
Kevin Freikevinfrei
Kevin Frei
authored andcommitted
Updated flag name, made the variable a bit more descriptive, too
1 parent 9751f02 commit d5e65a5

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

llvm/include/llvm/DebugInfo/DIContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ struct DIDumpOptions {
206206
bool IsEH = false;
207207
bool DumpNonSkeleton = false;
208208
bool ShowAggregateErrors = false;
209-
std::string JsonSummaryFile;
209+
std::string JsonErrSummaryFile;
210210
std::function<llvm::StringRef(uint64_t DwarfRegNum, bool IsEH)>
211211
GetNameForDWARFReg;
212212

llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,13 +2034,14 @@ void DWARFVerifier::summarize() {
20342034
error() << s << " occurred " << count << " time(s).\n";
20352035
});
20362036
}
2037-
if (!DumpOpts.JsonSummaryFile.empty()) {
2037+
if (!DumpOpts.JsonErrSummaryFile.empty()) {
20382038
std::error_code EC;
2039-
raw_fd_ostream JsonStream(DumpOpts.JsonSummaryFile, EC, sys::fs::OF_Text);
2039+
raw_fd_ostream JsonStream(DumpOpts.JsonErrSummaryFile, EC,
2040+
sys::fs::OF_Text);
20402041
if (EC) {
20412042
error() << "unable to open json summary file '"
2042-
<< DumpOpts.JsonSummaryFile << "' for writing: " << EC.message()
2043-
<< '\n';
2043+
<< DumpOpts.JsonErrSummaryFile
2044+
<< "' for writing: " << EC.message() << '\n';
20442045
return;
20452046
}
20462047

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ static opt<ErrorDetailLevel> ErrorDetails(
297297
clEnumValN(BothDetailsAndSummary, "full",
298298
"Display each error as well as a summary. [default]")),
299299
cat(DwarfDumpCategory));
300-
static opt<std::string> JsonSummaryFile(
301-
"json-summary-file", init(""),
300+
static opt<std::string> JsonErrSummaryFile(
301+
"verify-json", init(""),
302302
desc("Output JSON-formatted error summary to the specified file. "
303303
"(Implies --verify)"),
304304
value_desc("filename.json"), cat(DwarfDumpCategory));
@@ -356,7 +356,7 @@ static DIDumpOptions getDumpOpts(DWARFContext &C) {
356356
ErrorDetails != NoDetailsOrSummary;
357357
DumpOpts.ShowAggregateErrors = ErrorDetails != OnlyDetailsNoSummary &&
358358
ErrorDetails != NoDetailsOnlySummary;
359-
DumpOpts.JsonSummaryFile = JsonSummaryFile;
359+
DumpOpts.JsonErrSummaryFile = JsonErrSummaryFile;
360360
return DumpOpts.noImplicitRecursion();
361361
}
362362
return DumpOpts;
@@ -843,7 +843,7 @@ int main(int argc, char **argv) {
843843
return 1;
844844
}
845845
// -error-detail and -json-summary-file both imply -verify
846-
if (ErrorDetails != Unspecified || !JsonSummaryFile.empty()) {
846+
if (ErrorDetails != Unspecified || !JsonErrSummaryFile.empty()) {
847847
Verify = true;
848848
}
849849

0 commit comments

Comments
 (0)