[llvm] [DTLTO] [LLVM] Initial DTLTO cache implementation (PR #156433)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 17 09:34:30 PDT 2025


================
@@ -2512,15 +2560,32 @@ class OutOfProcessThinBackend : public CGThinBackend {
             BCError + "cannot open native object file: " +
                 Job.NativeObjectPath + ": " + EC.message(),
             inconvertibleErrorCode());
-      auto StreamOrErr = AddStream(Job.Task, Job.ModuleID);
-      if (Error Err = StreamOrErr.takeError())
-        report_fatal_error(std::move(Err));
-      auto &Stream = *StreamOrErr->get();
-      *Stream.OS << ObjFileMbOrErr->get()->getMemBufferRef().getBuffer();
-      if (Error Err = Stream.commit())
-        report_fatal_error(std::move(Err));
-    }
 
+      MemoryBufferRef ObjFileMbRef = ObjFileMbOrErr->get()->getMemBufferRef();
+      if (Cache.isValid() && Job.CacheAddStream) {
----------------
teresajohnson wrote:

Can Cache.isValid be false if CacheAddStream is non-null?

https://github.com/llvm/llvm-project/pull/156433


More information about the llvm-commits mailing list