From fdfd60cc79ba1e9ad6d589ca78d40a20e15ba15a Mon Sep 17 00:00:00 2001 From: Alex Denisov Date: Wed, 14 Dec 2022 12:00:17 +0100 Subject: [PATCH] Swift: Removing this patch for now as it breaks the extractor in some other way --- ...terface-compilation-for-resource-dir.patch | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 patches/swift/03-reinstate-swiftinterface-compilation-for-resource-dir.patch diff --git a/patches/swift/03-reinstate-swiftinterface-compilation-for-resource-dir.patch b/patches/swift/03-reinstate-swiftinterface-compilation-for-resource-dir.patch deleted file mode 100644 index 3b9ed4a..0000000 --- a/patches/swift/03-reinstate-swiftinterface-compilation-for-resource-dir.patch +++ /dev/null @@ -1,30 +0,0 @@ -When running the extractor against a different version of the swift compiler, we provide it the -original standard library via `-resource-dir`, and we do want that to be lazily compiled out of the -`.swiftinterface` files. The code removed here explicitly disables that behavior. - -diff --git a/lib/Frontend/ModuleInterfaceLoader.cpp b/lib/Frontend/ModuleInterfaceLoader.cpp -index 2a490a680d8..8d8f48aeed0 100644 ---- a/lib/Frontend/ModuleInterfaceLoader.cpp -+++ b/lib/Frontend/ModuleInterfaceLoader.cpp -@@ -726,21 +726,6 @@ class ModuleInterfaceLoaderImpl { - << "; deferring to serialized module loader\n"); - UsableModulePath = adjacentMod; - return std::make_error_code(std::errc::not_supported); -- } else if (isInResourceDir(adjacentMod) && -- loadMode == ModuleLoadingMode::PreferSerialized) { -- // Special-case here: If we're loading a .swiftmodule from the resource -- // dir adjacent to the compiler, defer to the serialized loader instead -- // of falling back. This is mainly to support development of Swift, -- // where one might change the module format version but forget to -- // recompile the standard library. If that happens, don't fall back -- // and silently recompile the standard library -- instead, error like -- // we used to. -- LLVM_DEBUG(llvm::dbgs() << "Found out-of-date module in the " -- "resource-dir at " -- << adjacentMod -- << "; deferring to serialized module loader " -- "to diagnose\n"); -- return std::make_error_code(std::errc::not_supported); - } else { - LLVM_DEBUG(llvm::dbgs() << "Found out-of-date module at " - << adjacentMod << "\n");