diff options
| author | Nick Kledzik <kledzik@apple.com> | 2013-09-10 23:57:41 +0000 |
|---|---|---|
| committer | Nick Kledzik <kledzik@apple.com> | 2013-09-10 23:57:41 +0000 |
| commit | 2e0fb1ef5b8752fb09b86285a2bd111dbac78a28 (patch) | |
| tree | c66353b4f9b46597f61324aceb8e4c16285bd23e | |
| parent | e773e327d3c27ffad1fca361a21f53c90a97f3b9 (diff) | |
| download | bcm5719-llvm-2e0fb1ef5b8752fb09b86285a2bd111dbac78a28.tar.gz bcm5719-llvm-2e0fb1ef5b8752fb09b86285a2bd111dbac78a28.zip | |
Allow darwin driver to use -help when no input files are specified.
Patch by Joe Ranieri
llvm-svn: 190453
| -rw-r--r-- | lld/lib/Driver/DarwinLdDriver.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp index 880e8a71754..eb8bd2aa027 100644 --- a/lld/lib/Driver/DarwinLdDriver.cpp +++ b/lld/lib/Driver/DarwinLdDriver.cpp @@ -236,6 +236,16 @@ bool DarwinLdDriver::parse(int argc, const char *argv[], // No min-os version on command line, check environment variables } + // 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; + } + } + std::unique_ptr<InputGraph> inputGraph(new InputGraph()); // Handle input files @@ -253,16 +263,6 @@ 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; |

