Skip to content

Commit 057c8bb

Browse files
[BlockList] Don't share the SourceManager in BlockListStore
BlockListStore doesn't need to keep the buffer after the block-list is parsed. Don't share the same source manager as the compilation so it doesn't need to make sure the buffer is valid during the entire duration of the compilation. rdar://137448231
1 parent d6e8eb2 commit 057c8bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Basic/BlockList.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "swift/Basic/SourceManager.h"
2020

2121
struct swift::BlockListStore::Implementation {
22-
SourceManager &SM;
22+
SourceManager SM;
2323
llvm::StringMap<std::vector<BlockListAction>> ModuleActionDict;
2424
llvm::StringMap<std::vector<BlockListAction>> ProjectActionDict;
2525
void addConfigureFilePath(StringRef path);
@@ -45,7 +45,7 @@ struct swift::BlockListStore::Implementation {
4545
return std::string();
4646
}
4747

48-
Implementation(SourceManager &SM) : SM(SM) {}
48+
Implementation(SourceManager &SM) : SM(SM.getFileSystem()) {}
4949
};
5050

5151
swift::BlockListStore::BlockListStore(swift::SourceManager &SM)

0 commit comments

Comments
 (0)