mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[sourcekit] Remove reference to global context from SwiftLangSupport NFC
While the SwiftLangSupport doesn't currently outlive the global context it clarifies the ownership to just store the weak reference we care about instead of referencing the owning context. In the future we may want to ref-count the lang support, in which case we'd need to do this to avoid a cycle anyway.
This commit is contained in:
@@ -173,7 +173,8 @@ UIdent UIdentVisitor::visitExtensionDecl(const ExtensionDecl *D) {
|
||||
}
|
||||
|
||||
SwiftLangSupport::SwiftLangSupport(SourceKit::Context &SKCtx)
|
||||
: SKCtx(SKCtx), CCCache(new SwiftCompletionCache) {
|
||||
: NotificationCtr(SKCtx.getNotificationCenter()),
|
||||
CCCache(new SwiftCompletionCache) {
|
||||
llvm::SmallString<128> LibPath(SKCtx.getRuntimeLibPath());
|
||||
llvm::sys::path::append(LibPath, "swift");
|
||||
RuntimeResourcePath = LibPath.str();
|
||||
|
||||
Reference in New Issue
Block a user