[lld] r190453 - Allow darwin driver to use -help when no input files are specified.
Nick Kledzik
kledzik at apple.com
Tue Sep 10 16:57:42 PDT 2013
Author: kledzik
Date: Tue Sep 10 18:57:41 2013
New Revision: 190453
URL: http://llvm.org/viewvc/llvm-project?rev=190453&view=rev
Log:
Allow darwin driver to use -help when no input files are specified.
Patch by Joe Ranieri
Modified:
lld/trunk/lib/Driver/DarwinLdDriver.cpp
Modified: lld/trunk/lib/Driver/DarwinLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/DarwinLdDriver.cpp?rev=190453&r1=190452&r2=190453&view=diff
==============================================================================
--- lld/trunk/lib/Driver/DarwinLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/DarwinLdDriver.cpp Tue Sep 10 18:57:41 2013
@@ -236,6 +236,16 @@ bool DarwinLdDriver::parse(int argc, con
// 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, con
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;
More information about the llvm-commits
mailing list