mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[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. llvm-svn: 345084
This commit is contained in:
parent
2e4526d022
commit
0b62cfbeba
@ -24,3 +24,6 @@ HELP-NOT: -reverse-iterate
|
||||
|
||||
RUN: llvm-dwarfdump --version 2>&1 | FileCheck --check-prefix=VERSION %s
|
||||
VERSION: {{ version }}
|
||||
|
||||
RUN: llvm-dwarfdump -diff -verbose 2>&1 | FileCheck --check-prefix=INCOMPATIBLE %s
|
||||
INCOMPATIBLE: error: incompatible arguments: specifying both -diff and -verbose is currently not supported
|
||||
|
@ -226,7 +226,7 @@ static alias VerboseAlias("v", desc("Alias for -verbose."), aliasopt(Verbose),
|
||||
static void error(StringRef Prefix, std::error_code EC) {
|
||||
if (!EC)
|
||||
return;
|
||||
errs() << Prefix << ": " << EC.message() << "\n";
|
||||
WithColor::error() << Prefix << ": " << EC.message() << "\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -571,6 +571,14 @@ int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FIXME: Audit interactions between these two options and make them
|
||||
// compatible.
|
||||
if (Diff && Verbose) {
|
||||
WithColor::error() << "incompatible arguments: specifying both -diff and "
|
||||
"-verbose is currently not supported";
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::unique_ptr<ToolOutputFile> OutputFile;
|
||||
if (!OutputFilename.empty()) {
|
||||
std::error_code EC;
|
||||
|
Loading…
Reference in New Issue
Block a user