Merge pull request #40893 from zoecarver/interop-index-store-crash

[cxx-interop] Fix crash when indexing with C++ interop enabled.
This commit is contained in:
Zoe Carver
2022-01-18 13:31:26 -08:00
committed by GitHub
2 changed files with 10 additions and 1 deletions

View File

@@ -1019,7 +1019,9 @@ static void performEndOfPipelineActions(CompilerInstance &Instance) {
// FIXME: This predicate matches the status quo, but there's no reason
// indexing cannot run for actions that do not require stdlib e.g. to better
// facilitate tests.
if (FrontendOptions::doesActionRequireSwiftStandardLibrary(action)) {
if (FrontendOptions::doesActionRequireSwiftStandardLibrary(action) &&
// TODO: indexing often crashes when interop is enabled (rdar://87719859).
!Invocation.getLangOptions().EnableCXXInterop) {
emitIndexData(Instance);
}