llvm.org GIT mirror llvm / ed9fa1a
[dwarfdump] Make incompatibility between -diff and -verbose explicit. Using -diff and -verbose together doesn't work today. We should audit where these two options interact and fix them. In the meantime we error out when the user try to specify both. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345084 91177308-0d34-0410-b5e6-96231b3b80d8 Jonas Devlieghere 11 months ago
2 changed file(s) with 12 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2323
2424 RUN: llvm-dwarfdump --version 2>&1 | FileCheck --check-prefix=VERSION %s
2525 VERSION: {{ version }}
26
27 RUN: llvm-dwarfdump -diff -verbose 2>&1 | FileCheck --check-prefix=INCOMPATIBLE %s
28 INCOMPATIBLE: error: incompatible arguments: specifying both -diff and -verbose is currently not supported
225225 static void error(StringRef Prefix, std::error_code EC) {
226226 if (!EC)
227227 return;
228 errs() << Prefix << ": " << EC.message() << "\n";
228 WithColor::error() << Prefix << ": " << EC.message() << "\n";
229229 exit(1);
230230 }
231231
570570 return 0;
571571 }
572572
573 // FIXME: Audit interactions between these two options and make them
574 // compatible.
575 if (Diff && Verbose) {
576 WithColor::error() << "incompatible arguments: specifying both -diff and "
577 "-verbose is currently not supported";
578 return 0;
579 }
580
573581 std::unique_ptr OutputFile;
574582 if (!OutputFilename.empty()) {
575583 std::error_code EC;