mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[index] Remove import.sourcefile kind from indexing
We don't support importing source files in source code, and they only showed up in the index under failure conditions.
This commit is contained in:
@@ -26,7 +26,6 @@ enum class SymbolKind {
|
||||
|
||||
Module,
|
||||
ClangModule, // FIXME: collapse into Module and use a separate Language field.
|
||||
SourceFile,
|
||||
|
||||
Enum,
|
||||
Struct,
|
||||
|
||||
@@ -410,10 +410,6 @@ bool IndexSwiftASTWalker::visitImports(
|
||||
for (auto File : Mod->getFiles()) {
|
||||
switch (File->getKind()) {
|
||||
case FileUnitKind::Source:
|
||||
assert(ImportKind == SymbolKind::Unknown &&
|
||||
"cannot handle multi-file modules");
|
||||
ImportKind = SymbolKind::SourceFile;
|
||||
break;
|
||||
case FileUnitKind::Builtin:
|
||||
case FileUnitKind::Derived:
|
||||
break;
|
||||
|
||||
@@ -7,27 +7,6 @@
|
||||
key.filepath: Swift.swiftmodule,
|
||||
key.hash: <hash>,
|
||||
key.is_system: 1
|
||||
},
|
||||
{
|
||||
key.kind: source.lang.swift.import.sourcefile,
|
||||
key.name: "ObjectiveC",
|
||||
key.filepath: ObjectiveC.swift,
|
||||
key.hash: <hash>,
|
||||
key.dependencies: [
|
||||
{
|
||||
key.kind: source.lang.swift.import.module.swift,
|
||||
key.name: "Swift",
|
||||
key.filepath: Swift.swiftmodule,
|
||||
key.hash: <hash>,
|
||||
key.is_system: 1
|
||||
},
|
||||
{
|
||||
key.kind: source.lang.swift.import.module.clang,
|
||||
key.name: "ObjectiveC",
|
||||
key.filepath: ObjectiveC.pcm,
|
||||
key.is_system: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
key.entities: [
|
||||
|
||||
@@ -30,7 +30,6 @@ using namespace swift::index;
|
||||
|
||||
static UIdent KindImportModuleClang("source.lang.swift.import.module.clang");
|
||||
static UIdent KindImportModuleSwift("source.lang.swift.import.module.swift");
|
||||
static UIdent KindImportSourceFile("source.lang.swift.import.sourcefile");
|
||||
|
||||
static UIdent getUIDForDependencyKind(SymbolKind depKind) {
|
||||
switch (depKind) {
|
||||
@@ -38,8 +37,6 @@ static UIdent getUIDForDependencyKind(SymbolKind depKind) {
|
||||
return KindImportModuleSwift;
|
||||
case SymbolKind::ClangModule:
|
||||
return KindImportModuleClang;
|
||||
case SymbolKind::SourceFile:
|
||||
return KindImportSourceFile;
|
||||
default:
|
||||
return UIdent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user