summaryrefslogtreecommitdiff
path: root/tools/driver
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2018-01-15 21:05:40 +0000
committerBrian Gesiak <modocache@gmail.com>2018-01-15 21:05:40 +0000
commit16360a5e793d6d0610293e5299f0ba0d81d32262 (patch)
tree70c1b1e1802a0da0141df7fb80d2c8568f4ea0ed /tools/driver
parent10a329967d4f4287cca94417cf5ebabbcc9cc0c1 (diff)
downloadclang-16360a5e793d6d0610293e5299f0ba0d81d32262.tar.gz
[Driver] Suggest valid integrated tools
Summary: There are only two valid integrated Clang driver tools: `-cc1` and `-cc1as`. If a user asks for an unknown tool, such as `-cc1asphalt`, an error message is displayed to indicate that there is no such tool, but the message doesn't indicate what the valid options are. Include the valid options in the error message. Test Plan: `check-clang` Reviewers: sepavloff, bkramer, phosek Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42004 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@322517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver')
-rw-r--r--tools/driver/driver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index fa757da953..611bff233e 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -311,7 +311,8 @@ static int ExecuteCC1Tool(ArrayRef<const char *> argv, StringRef Tool) {
return cc1as_main(argv.slice(2), argv[0], GetExecutablePathVP);
// Reject unknown tools.
- llvm::errs() << "error: unknown integrated tool '" << Tool << "'\n";
+ llvm::errs() << "error: unknown integrated tool '" << Tool << "'. "
+ << "Valid tools include '-cc1' and '-cc1as'.\n";
return 1;
}