[Driver/ClangImporter] Changes for the driver to recognize -pch-output-dir and propagate to the frontend invocations

For the multiple-files mode -emit-pch is still invoked in separate frontend invocation but with using a persistent PCH.
Subsequent frontend invocations use the persistent PCH but they don't need to validate it.

For all-files mode (e.g. WMO) the frontend invocation uses a persistent PCH that it also validates.
This commit is contained in:
Argyrios Kyrtzidis
2017-05-11 11:44:12 -07:00
parent cbc35f03d3
commit c4b5b60d00
18 changed files with 151 additions and 38 deletions

View File

@@ -1129,6 +1129,7 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
if (const Arg *A = Args.getLastArg(OPT_pch_output_dir)) {
Opts.PrecompiledHeaderOutputDir = A->getValue();
Opts.PCHDisableValidation |= Args.hasArg(OPT_pch_disable_validation);
}
return false;