mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[frontend] Add '-parse-as-library' at the tablegen'ed frontend options.
Swift SVN r7500
This commit is contained in:
@@ -70,6 +70,9 @@ public:
|
||||
|
||||
bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
|
||||
DiagnosticEngine &Diags) {
|
||||
if (Args.empty())
|
||||
return false;
|
||||
|
||||
// Parse command line options using FrontendOptions.td
|
||||
std::unique_ptr<llvm::opt::InputArgList> ParsedArgs;
|
||||
FrontendOptTable Table;
|
||||
@@ -105,6 +108,10 @@ bool CompilerInvocation::parseArgs(ArrayRef<const char *> Args,
|
||||
setClangModuleCachePath(InputArg->getValue());
|
||||
break;
|
||||
|
||||
case OPT_parse_as_library:
|
||||
setTUKind(TranslationUnit::Library);
|
||||
break;
|
||||
|
||||
case OPT_parse_stdlib:
|
||||
setParseStdlib();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user