[Bridging PCH] Pass .pch bridging headers to clang -import-pch

This commit is contained in:
Graydon Hoare
2016-11-29 16:38:26 -08:00
parent d709aff91a
commit 874dc3b498
4 changed files with 83 additions and 14 deletions

View File

@@ -768,7 +768,7 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
Opts.ImportUnderlyingModule |= Args.hasArg(OPT_import_underlying_module);
Opts.SILSerializeAll |= Args.hasArg(OPT_sil_serialize_all);
if (const Arg *A = Args.getLastArg(OPT_import_objc_header)) {
if (const Arg *A = Args.getLastArgNoClaim(OPT_import_objc_header)) {
Opts.ImplicitObjCHeaderPath = A->getValue();
Opts.SerializeBridgingHeader |=
!Opts.PrimaryInput && !Opts.ModuleOutputPath.empty();
@@ -995,7 +995,8 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts,
if (Args.hasArg(OPT_embed_bitcode))
Opts.Mode = ClangImporterOptions::Modes::EmbedBitcode;
if (auto *A = Args.getLastArg(OPT_import_objc_header))
Opts.BridgingHeader = A->getValue();
Opts.DisableSwiftBridgeAttr |= Args.hasArg(OPT_disable_swift_bridge_attr);
Opts.DisableModulesValidateSystemHeaders |= Args.hasArg(OPT_disable_modules_validate_system_headers);