summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/dsymutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/dsymutil/dsymutil.cpp')
-rw-r--r--llvm/tools/dsymutil/dsymutil.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/tools/dsymutil/dsymutil.cpp b/llvm/tools/dsymutil/dsymutil.cpp
index 983e86808e7..88a85937a62 100644
--- a/llvm/tools/dsymutil/dsymutil.cpp
+++ b/llvm/tools/dsymutil/dsymutil.cpp
@@ -148,6 +148,11 @@ static Expected<std::vector<std::string>> getInputs(opt::InputArgList &Args,
// Verify that the given combination of options makes sense.
static Error verifyOptions(const DsymutilOptions &Options) {
+ if (Options.InputFiles.empty()) {
+ return make_error<StringError>("no input files specified",
+ errc::invalid_argument);
+ }
+
if (Options.LinkOpts.Update &&
std::find(Options.InputFiles.begin(), Options.InputFiles.end(), "-") !=
Options.InputFiles.end()) {
@@ -440,6 +445,11 @@ int main(int argc, char **argv) {
std::string SDKPath = sys::fs::getMainExecutable(argv[0], P);
SDKPath = sys::path::parent_path(SDKPath);
+ for (auto *Arg : Args.filtered(OPT_UNKNOWN)) {
+ WithColor::warning() << "ignoring unknown option: " << Arg->getSpelling()
+ << '\n';
+ }
+
if (Args.hasArg(OPT_help)) {
T.PrintHelp(
outs(), (std::string(argv[0]) + " [options] <input files>").c_str(),
OpenPOWER on IntegriCloud