Commit Graph

369 Commits

Author SHA1 Message Date
Connor Wakamo
044be74855 [frontend] Move ParseStdlib from CompilerInvocation to FrontendOptions, and move handling of -parse-stdlib to ParseFrontendArgs().
Swift SVN r12173
2014-01-11 00:33:30 +00:00
Connor Wakamo
c193138c33 [frontend] Added convenience accessors to determine if a SelectedInput is a filename or a buffer.
Swift SVN r12153
2014-01-10 22:39:06 +00:00
Connor Wakamo
18795f8293 [frontend] Switch from llvm::Optional to swift::Optional for FrontendOptions::PrimaryInput.
Swift SVN r12152
2014-01-10 22:39:06 +00:00
Connor Wakamo
8475eeaad3 [frontend] Make InputKind::Filename the default InputKind for a SelectedInput.
Nearly all uses of this will be to specify a filename, so make that the default.

Swift SVN r12149
2014-01-10 22:39:04 +00:00
Connor Wakamo
e9cc548765 [frontend] Added support in FrontendOptions for denoting the primary input.
When a primary input is specified, output will only be generated for that input. (If a primary input is not specified, output will be generated for the whole module.)
This commit only adds the storage for the primary input; the primary input is not yet honored by the frontend, nor is it possible to specify the primary input.

Swift SVN r12148
2014-01-10 22:39:04 +00:00
Connor Wakamo
d360c2d167 [frontend] Moved InputBuffers from CompilerInvocation to FrontendOptions.
Swift SVN r12147
2014-01-10 22:39:04 +00:00
Connor Wakamo
9861019cc5 [frontend] Add a member function to FrontendOptions which returns whether or not the RequestedAction has output.
Swift SVN r11393
2013-12-17 21:34:24 +00:00
Connor Wakamo
3705f018ac [frontend] Make -dump-parse explicitly set ParseOnly to true.
Also updated the comments in FrontendOptions::ActionType to indicate that only -dump-parse skips type-checking. (Previously, the comments implied that -parse also skipped type-checking, which is not the desired behavior.)

Swift SVN r11374
2013-12-17 02:43:39 +00:00
Connor Wakamo
2216a31de6 [frontend] Moved ParseOnly from CompilerInvocation to FrontendOptions.
Swift SVN r11373
2013-12-17 02:43:39 +00:00
Connor Wakamo
20e0d1c64e [frontend] Add support for parsing the action which the integrated frontend should perform.
Added an ActionType enum to FrontendOptions with the various actions that the integrated frontend will support, as well as a new RequestedAction member.
Added support for determining the user’s requested action in ParseFrontendArgs. (The integrated frontend does not yet honor this request; support for that is forthcoming.)

Swift SVN r11372
2013-12-17 02:43:27 +00:00
Connor Wakamo
40dfbc0bc8 [frontend] Add support for parsing ImmediateArgv.
These are not yet used, since the integrated frontend doesn’t yet support immediate mode, but they are ready for use once immediate mode is supported.

Swift SVN r11326
2013-12-15 00:58:28 +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
f203e1fd96 [frontend] Moved ModuleSourceListPath from CompilerInvocation to FrontendOptions.
Also moved the handling of -module-source-list from the loop to ParseFrontendArgs.

Swift SVN r11290
2013-12-14 01:44:12 +00:00
Connor Wakamo
e6b0f16ad0 [frontend] Add support for -print-stats.
Swift SVN r11190
2013-12-12 17:44:51 +00:00
Connor Wakamo
23a60d60d8 [frontend] Added support for -delayed-function-body-parsing.
Swift SVN r11188
2013-12-12 17:32:02 +00:00
Connor Wakamo
d14959b586 [frontend] Switch from providing a constructor for FrontendOptions to providing default values for its members.
Swift SVN r11173
2013-12-12 03:17:43 +00:00
Connor Wakamo
4ede1d0c23 [frontend] Added support for parsing the “-emit-verbose-sil” frontend argument.
This is not yet hooked up anywhere (beyond FrontendOptions), since the integrated frontend does not yet know how to emit SIL.

Swift SVN r11161
2013-12-12 00:48:13 +00:00
Connor Wakamo
84f9c6fa1b [frontend] Add comments to FrontendOptions.
Swift SVN r11159
2013-12-12 00:48:12 +00:00
Connor Wakamo
59c07ab012 [frontend] Began splitting options in CompilerInvocation into separate classes.
Added a new FrontendOptions class, which will eventually contain the options for controlling the behavior of the frontend. (This is similar to Clang’s FrontendOptions class.)
Moved InputFilenames, OutputFilename, ModuleName, and SerializedDiagnosticsPath from CompilerInvocation into FrontendOptions.
Split out argument parsing for options in FrontendOptions into a separate ParseFrontendArgs static function.

Swift SVN r11155
2013-12-11 23:58:55 +00:00