Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions lib/Index/IndexRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,16 @@ class StdlibGroupsIndexRecordingConsumer : public IndexDataConsumer {
}

void finish() override {
for (auto &pair : TrackerByGroup) {
StringRef groupName = pair.first();
SymbolTracker &tracker = *pair.second;
bool cont = onFinish(groupName, tracker);
SmallVector<std::pair<StringRef, SymbolTracker *>, 0> SortedGroups;
for (auto &entry : TrackerByGroup) {
SortedGroups.emplace_back(entry.first(), entry.second.get());
}
llvm::sort(SortedGroups, llvm::less_first());

for (auto &pair : SortedGroups) {
StringRef groupName = pair.first;
SymbolTracker *tracker = pair.second;
bool cont = onFinish(groupName, *tracker);
if (!cont)
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

// CHECK: [[SWIFT]]
// CHECK: DEPEND START
// CHECK: Record | system | Swift.String | [[MODULE]] | {{.+}}.swiftinterface_String-{{.*}}
// CHECK: Record | system | Swift.Math.Floating | [[MODULE]] | {{.+}}.swiftinterface_Math_Floating-{{.*}}
// CHECK: Record | system | Swift.String | [[MODULE]] | {{.+}}.swiftinterface_String-{{.*}}
// CHECK: DEPEND END

func test1() {
Expand Down