File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -426,16 +426,16 @@ static void addModuleDependencies(ArrayRef<ImportedModule> imports,
426
426
bool withoutUnitName = true ;
427
427
if (FU->getKind () == FileUnitKind::ClangModule) {
428
428
auto clangModUnit = cast<ClangModuleUnit>(LFU);
429
- if ((!clangModUnit-> isSystemModule () || indexSystemModules)) {
430
- withoutUnitName = !indexClangModules ;
431
- if ( auto clangMod = clangModUnit-> getUnderlyingClangModule ()) {
432
- moduleName = clangMod-> getTopLevelModuleName ();
433
- // FIXME: clang's -Rremarks do not seem to go through Swift's
434
- // diagnostic emitter.
435
- if (indexClangModules)
436
- clang::index::emitIndexDataForModuleFile (clangMod,
437
- clangCI, unitWriter);
438
- }
429
+ bool shouldIndexModule = indexClangModules &&
430
+ (!clangModUnit-> isSystemModule () || indexSystemModules) ;
431
+ withoutUnitName = !shouldIndexModule;
432
+ if ( auto clangMod = clangModUnit-> getUnderlyingClangModule ()) {
433
+ moduleName = clangMod-> getTopLevelModuleName ();
434
+ // FIXME: clang's -Rremarks do not seem to go through Swift's
435
+ // diagnostic emitter.
436
+ if (shouldIndexModule)
437
+ clang::index::emitIndexDataForModuleFile (clangMod,
438
+ clangCI, unitWriter);
439
439
}
440
440
} else {
441
441
// Serialized AST file.
You can’t perform that action at this time.
0 commit comments