Skip to content

Commit 3152267

Browse files
Merge pull request #14759 from bcardosolopes/swift-4.1-branch-pch-modules
ClangImporter: Update Swift for changes in clang (PCH + Modules issues)
2 parents d2aeb27 + ae98269 commit 3152267

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,7 @@ ClangImporter::create(ASTContext &ctx,
983983
if (importerOpts.Mode == ClangImporterOptions::Modes::EmbedBitcode)
984984
return importer;
985985

986+
instance.getLangOpts().NeededByPCHOrCompilationUsesPCH = true;
986987
bool canBegin = action->BeginSourceFile(instance,
987988
instance.getFrontendOpts().Inputs[0]);
988989
if (!canBegin)
@@ -1361,6 +1362,7 @@ ClangImporter::emitBridgingPCH(StringRef headerPath,
13611362
invocation->getFrontendOpts().OutputFile = outputPCHPath;
13621363
invocation->getFrontendOpts().ProgramAction = clang::frontend::GeneratePCH;
13631364
invocation->getPreprocessorOpts().resetNonModularOptions();
1365+
invocation->getLangOpts()->NeededByPCHOrCompilationUsesPCH = true;
13641366

13651367
clang::CompilerInstance emitInstance(
13661368
Impl.Instance->getPCHContainerOperations());

0 commit comments

Comments
 (0)