Merge pull request #83204 from swiftlang/jepa-main

Address rebranch deprecations
This commit is contained in:
Anthony Latsis
2025-07-23 06:00:57 +01:00
committed by GitHub
57 changed files with 568 additions and 879 deletions

View File

@@ -78,11 +78,11 @@ public:
(void)Shortened;
std::optional<ObjectRef> PathRef;
if (Error E =
CAS.storeFromString(std::nullopt, Path).moveInto(PathRef))
CAS.storeFromString(/*Refs*/ {}, Path).moveInto(PathRef))
return E;
std::optional<ObjectRef> BytesRef;
if (Error E =
CAS.storeFromString(std::nullopt, Bytes).moveInto(BytesRef))
CAS.storeFromString(/*Refs*/ {}, Bytes).moveInto(BytesRef))
return E;
auto Ref = CAS.store({*PathRef, *BytesRef}, {});
if (!Ref)
@@ -256,7 +256,7 @@ Error SwiftCASOutputBackend::Implementation::storeImpl(
StringRef Path, StringRef Bytes, unsigned InputIndex,
file_types::ID OutputKind) {
std::optional<ObjectRef> BytesRef;
if (Error E = CAS.storeFromString(std::nullopt, Bytes).moveInto(BytesRef))
if (Error E = CAS.storeFromString(/*Refs*/ {}, Bytes).moveInto(BytesRef))
return E;
LLVM_DEBUG(llvm::dbgs() << "DEBUG: producing CAS output of type \'"

View File

@@ -72,14 +72,14 @@ llvm::Expected<llvm::cas::ObjectRef> swift::createCompileJobBaseCacheKey(
}
llvm::cas::HierarchicalTreeBuilder Builder;
auto CMD = CAS.storeFromString(std::nullopt, CommandLine);
auto CMD = CAS.storeFromString(/*Refs*/ {}, CommandLine);
if (!CMD)
return CMD.takeError();
Builder.push(*CMD, llvm::cas::TreeEntry::Regular, "command-line");
// FIXME: The version is maybe insufficient...
auto Version =
CAS.storeFromString(std::nullopt, version::getSwiftFullVersion());
CAS.storeFromString(/*Refs*/ {}, version::getSwiftFullVersion());
if (!Version)
return Version.takeError();
Builder.push(*Version, llvm::cas::TreeEntry::Regular, "version");