[lld] [lld][MachO]Multi-threaded i/o. Twice as fast linking a large project. (PR #147134)
John Holdsworth via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 11:01:18 PDT 2025
================
@@ -441,6 +522,24 @@ static InputFile *addFile(StringRef path, LoadType loadType,
return newFile;
}
+static InputFile *addFile(StringRef path, LoadType loadType,
+ bool isLazy = false, bool isExplicit = true,
+ bool isBundleLoader = false,
+ bool isForceHidden = false) {
+ return processFile(readFile(path), nullptr, path, loadType, isLazy,
+ isExplicit, isBundleLoader, isForceHidden);
+}
+
+static void deferFile(StringRef path, bool isLazy, DeferredFiles &deferred) {
+ std::optional<MemoryBufferRef> buffer = readFile(path);
+ if (!buffer)
+ return;
+ if (config->readThreads)
+ deferred.push_back({path, isLazy, *buffer});
----------------
johnno1962 wrote:
Not since we changed it back to a struct.
https://github.com/llvm/llvm-project/pull/147134
More information about the llvm-commits
mailing list