[Dependency Scanning] Record header dependencies of Binary Swift module dependencies

These are meant to capture paths to the PCH files that a given module was built with.
This commit is contained in:
Artem Chikin
2023-06-09 13:50:07 -07:00
parent 90a1bb812b
commit b974d97879
6 changed files with 97 additions and 51 deletions

View File

@@ -150,15 +150,20 @@ 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);
struct BinaryModuleImports {
llvm::StringSet<> moduleImports;
llvm::StringSet<> headerImports;
};
static llvm::ErrorOr<BinaryModuleImports>
getImportsOfModule(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>