mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sink private-file import support down to SerializedASTFile
Implementing it in LoadedFile is nice in theory, but causes a leak in practice because that type is ASTContext-allocated and usually never destroyed. https://bugs.swift.org/browse/SR-11366
This commit is contained in:
@@ -955,6 +955,11 @@ void SerializedASTFile::lookupValue(ModuleDecl::AccessPathTy accessPath,
|
||||
File.lookupValue(name, results);
|
||||
}
|
||||
|
||||
StringRef
|
||||
SerializedASTFile::getFilenameForPrivateDecl(const ValueDecl *decl) const {
|
||||
return File.FilenamesForPrivateValues.lookup(decl);
|
||||
}
|
||||
|
||||
TypeDecl *SerializedASTFile::lookupLocalType(llvm::StringRef MangledName) const{
|
||||
return File.lookupLocalType(MangledName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user