Commit Graph

58 Commits

Author SHA1 Message Date
Connor Wakamo
620b5abc20 [frontend] Add support for -disable-diagnostic-passes.
Swift SVN r11322
2013-12-15 00:58:23 +00:00
Connor Wakamo
0d3369be03 [frontend] Add support for -help and --help-hidden.
Added PrintHelp and PrintHelpHidden to FrontendOptions.
Marked both -help and --help-hidden with the FrontendOption flag.
Updated ParseFrontendArgs to parse -help and --help-hidden.
Updated frontend_main() so that it prints the help for the frontend options.

Swift SVN r11320
2013-12-14 23:52:15 +00:00
Connor Wakamo
a1266393cd [frontend] Implemented support for verifying diagnostics with the integrated frontend.
Added a new DiagnosticOptions class to swiftBasic, and added a DiagnosticOptions member to CompilerInvocation.
Added a static ParseDiagnosticArgs function to parse diagnostic-related arguments.
Added -verify to FrontendOptions.td, and added support for parsing -verify in ParseDiagnosticArgs.
Updated frontend_main() to enable and trigger the DiagnosticVerifier when -verify is passed.

Swift SVN r11318
2013-12-14 22:08:08 +00:00
Connor Wakamo
debe69032e [frontend] Restructured frontend_main() so that SILGen, SILPasses, and IRGen are not attempted if earlier stages generated errors.
Swift SVN r11317
2013-12-14 21:22:16 +00:00
Connor Wakamo
e6b0f16ad0 [frontend] Add support for -print-stats.
Swift SVN r11190
2013-12-12 17:44:51 +00:00
Connor Wakamo
0e81e109b2 [frontend] In frontend_main(), fall back to SWIFT_MODULES_SDK if -sdk is not passed to the frontend.
This works around <rdar://problem/15639860>, which covers properly handling a missing -sdk argument at either the driver or frontend level (or at both levels).

Swift SVN r11153
2013-12-11 23:13:36 +00:00
Connor Wakamo
42c61e2df1 [frontend] Return immediately from frontend_main() if CompilerInvocation::parseArgs() failed.
Swift SVN r11109
2013-12-11 01:29:16 +00:00
Connor Wakamo
02c1532d27 Initial support for an integrated frontend in swift_driver.
- Added support for invoking the Swift frontend via "swift_driver -frontend".
- Added frontend_main.cpp, which implements the main entry point for the
  integrated frontend. (Currently, this supports compiling an input Swift file
  into an object file.)
- Removed lib/Frontend/FrontendOptions.td, and replaced its functionality with
  options in include/Swift/Driver/Options.td and a new
  include/Swift/Driver/FrontendOptions.td. Options supported by the frontend
  are denoted by the FrontendOption flag; options which are not supported by
  the driver are denoted by the NoDriverOption flag.
- Updated CompilerInvocation::parseArgs() to use the option table returned from
  createDriverOptTable(), including renaming a handful of options. (-triple is
  now -target, and -Xclang is now -Xcc.)

Swift SVN r11082
2013-12-10 18:06:54 +00:00