[frontend] Add '-parse-as-library' at the tablegen'ed frontend options.

Swift SVN r7500
This commit is contained in:
Argyrios Kyrtzidis
2013-08-23 16:46:09 +00:00
parent b91b4b61e1
commit ad38cb384b
2 changed files with 10 additions and 0 deletions

View File

@@ -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;