Skip to content

Commit bfa5a1f

Browse files
committed
[index] Factor out the dependency between the core indexing walker and SourceKit
The goal is to be able to move the core IndexSwiftASTWalker code out of SourceKit, leaving only the serialization bits behind. Mostly this replaces some direct uses of UIdent strings with explicit enums, and then adds the translation code to produce those enums and to convert them into UIdents in SourceKit. rdar://problem/22348041
1 parent 3a59497 commit bfa5a1f

File tree

5 files changed

+496
-76
lines changed

5 files changed

+496
-76
lines changed

tools/SourceKit/include/SourceKit/Core/LangSupport.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ struct EntityInfo {
3838
TypeKind EntityType = Base;
3939

4040
UIdent Kind;
41-
llvm::SmallString<32> Name;
42-
llvm::SmallString<64> USR;
43-
llvm::SmallString<16> Group;
41+
StringRef Name;
42+
StringRef USR;
43+
StringRef Group;
4444
unsigned Line = 0;
4545
unsigned Column = 0;
4646

@@ -57,7 +57,7 @@ struct FuncDeclEntityInfo : public EntityInfo {
5757
};
5858

5959
struct CallRefEntityInfo : public EntityInfo {
60-
llvm::SmallString<64> ReceiverUSR;
60+
StringRef ReceiverUSR;
6161
bool IsDynamic = false;
6262

6363
CallRefEntityInfo() : EntityInfo(CallReference) { }

0 commit comments

Comments
 (0)