From 20326093276bcc8cb5c9dc6f23c1525f83f9b90f Mon Sep 17 00:00:00 2001 From: Shankar Easwaran Date: Wed, 21 Aug 2013 23:31:58 +0000 Subject: [PATCH] [lld][Darwin] fixing an accidentally removed change llvm-svn: 188963 --- lld/lib/Driver/DarwinLdDriver.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp index 90469d8..8ebbb8c 100644 --- a/lld/lib/Driver/DarwinLdDriver.cpp +++ b/lld/lib/Driver/DarwinLdDriver.cpp @@ -208,6 +208,16 @@ bool DarwinLdDriver::parse(int argc, const char *argv[], ctx.setInputGraph(std::move(inputGraph)); + // Handle -help + if (parsedArgs->getLastArg(OPT_help)) { + table.PrintHelp(llvm::outs(), argv[0], "LLVM Darwin Linker", false); + // If only -help on command line, don't try to do any linking + if ( argc == 2 ) { + ctx.setDoNothing(true); + return false; + } + } + // Validate the combination of options used. if (ctx.validate(diagnostics)) return true; -- 2.7.4