mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-23 19:59:48 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@345084 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f5961147fd
commit
ed9fa1afb6
@ -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