Skip to content

Commit 1f8f994

Browse files
author
David Ungar
committed
Changed PrimarySourceFiles from a SetVector to an ArrayRef.
1 parent 4a0a7f2 commit 1f8f994

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/swift/Frontend/Frontend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class CompilerInstance {
344344
/// Identifies the set of SourceFiles that are considered primaries. An
345345
/// invariant is that any SourceFile in this set with an associated
346346
/// buffer will also have its buffer ID in PrimaryBufferIDs.
347-
llvm::SetVector<SourceFile*> PrimarySourceFiles;
347+
std::vector<SourceFile *> PrimarySourceFiles;
348348

349349
/// Return whether there is an entry in PrimaryInputs for buffer \BufID.
350350
bool isPrimaryInput(unsigned BufID) const {
@@ -433,7 +433,7 @@ class CompilerInstance {
433433

434434
/// Gets the set of SourceFiles which are the primary inputs for this
435435
/// CompilerInstance.
436-
const llvm::SetVector<SourceFile*> &getPrimarySourceFiles() {
436+
const ArrayRef<SourceFile *> getPrimarySourceFiles() {
437437
return PrimarySourceFiles;
438438
}
439439

lib/Frontend/Frontend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void CompilerInstance::recordPrimaryInputBuffer(unsigned BufID) {
6767

6868
void CompilerInstance::recordPrimarySourceFile(SourceFile *SF) {
6969
assert(MainModule && "main module not created yet");
70-
PrimarySourceFiles.insert(SF);
70+
PrimarySourceFiles.push_back(SF);
7171
SF->setReferencedNameTracker(NameTracker);
7272
if (SF->getBufferID().hasValue())
7373
recordPrimaryInputBuffer(SF->getBufferID().getValue());

0 commit comments

Comments
 (0)