Guard with env var SWIFT_ENABLE_PACKAGE_INTERFACE_LOAD

Update tests and formatting
This commit is contained in:
Ellie Shin
2023-11-15 01:16:22 -08:00
parent 0f3625bf54
commit 82eef756ee
3 changed files with 25 additions and 16 deletions

View File

@@ -596,8 +596,9 @@ std::string SerializedModuleBaseName::getName(file_types::ID fileTy) const {
return std::string(result.str());
}
llvm::Optional<std::string> SerializedModuleBaseName::getPackageInterfacePathIfInSamePackage(llvm::vfs::FileSystem &fs, ASTContext &ctx) const {
llvm::Optional<std::string>
SerializedModuleBaseName::getPackageInterfacePathIfInSamePackage(llvm::vfs::FileSystem &fs,
ASTContext &ctx) const {
if (!ctx.LangOpts.EnablePackageInterfaceLoad)
return {};