mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Factor out reading in Binary module dependency imports from 'SerializedModuleLoaderBase::scanModuleFile'.
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
namespace swift {
|
||||
class ModuleFile;
|
||||
class PathObfuscator;
|
||||
enum class ModuleLoadingBehavior;
|
||||
namespace file_types {
|
||||
enum ID : uint8_t;
|
||||
}
|
||||
@@ -146,6 +148,16 @@ protected:
|
||||
/// Scan the given serialized module file to determine dependencies.
|
||||
llvm::ErrorOr<ModuleDependencyInfo> scanModuleFile(Twine modulePath, bool isFramework);
|
||||
|
||||
static llvm::ErrorOr<llvm::StringSet<>>
|
||||
getModuleImportsOfModule(Twine modulePath,
|
||||
ModuleLoadingBehavior transitiveBehavior,
|
||||
bool isFramework,
|
||||
bool isRequiredOSSAModules,
|
||||
StringRef SDKName,
|
||||
StringRef packageName,
|
||||
llvm::vfs::FileSystem *fileSystem,
|
||||
PathObfuscator &recoverer);
|
||||
|
||||
/// Load the module file into a buffer and also collect its module name.
|
||||
static std::unique_ptr<llvm::MemoryBuffer>
|
||||
getModuleName(ASTContext &Ctx, StringRef modulePath, std::string &Name);
|
||||
|
||||
Reference in New Issue
Block a user