diff options
| -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; |

