Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2024-07-03 18:14:58 -07:00
9 changed files with 134 additions and 27 deletions

View File

@@ -1786,6 +1786,19 @@ bool ModuleFileSharedCore::hasSourceInfo() const {
return !!DeclUSRsTable;
}
std::string ModuleFileSharedCore::resolveModuleDefiningFilePath(const StringRef SDKPath) const {
if (!ModuleInterfacePath.empty()) {
std::string interfacePath = ModuleInterfacePath.str();
if (llvm::sys::path::is_relative(interfacePath)) {
SmallString<128> absoluteInterfacePath(SDKPath);
llvm::sys::path::append(absoluteInterfacePath, interfacePath);
return absoluteInterfacePath.str().str();
} else
return interfacePath;
} else
return ModuleInputBuffer->getBufferIdentifier().str();
}
ModuleLoadingBehavior
ModuleFileSharedCore::getTransitiveLoadingBehavior(
const Dependency &dependency,