diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-10-23 21:51:44 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-10-23 21:51:44 +0000 |
commit | 3ef53e10d3a6bdefdf6e0974775ca0edafc5a91d (patch) | |
tree | fff5b891addcc128620468693ffc59a3204640f4 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | 9ef8e51cec45347b89b5d5ee6e2163403230d954 (diff) | |
download | llvm-3ef53e10d3a6bdefdf6e0974775ca0edafc5a91d.zip llvm-3ef53e10d3a6bdefdf6e0974775ca0edafc5a91d.tar.gz llvm-3ef53e10d3a6bdefdf6e0974775ca0edafc5a91d.tar.bz2 |
[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
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index af21a41..0ed8696 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -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; |