diff options
author | Steven Wu <stevenwu@apple.com> | 2024-10-29 10:37:37 -0700 |
---|---|---|
committer | Steven Wu <stevenwu@apple.com> | 2024-10-29 10:37:37 -0700 |
commit | 0acb07c50c259b2022ef4bf60d414e4616e171d5 (patch) | |
tree | 071f604b046c8e84b725c3125c1235c3ae373fb5 /llvm/lib/CAS/ActionCache.cpp | |
parent | b510cdb895b9188e5819c4c85a6dab22a4d14385 (diff) | |
parent | be2c38e110a7e595bd27f0bf92ad5762108c96a8 (diff) | |
download | llvm-users/cachemeifyoucan/spr/cas-add-ondiskcas.zip llvm-users/cachemeifyoucan/spr/cas-add-ondiskcas.tar.gz llvm-users/cachemeifyoucan/spr/cas-add-ondiskcas.tar.bz2 |
[𝘀𝗽𝗿] initial versionusers/cachemeifyoucan/spr/cas-add-ondiskcas
Created using spr 1.3.5
Diffstat (limited to 'llvm/lib/CAS/ActionCache.cpp')
-rw-r--r-- | llvm/lib/CAS/ActionCache.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/lib/CAS/ActionCache.cpp b/llvm/lib/CAS/ActionCache.cpp new file mode 100644 index 0000000..851fee5 --- /dev/null +++ b/llvm/lib/CAS/ActionCache.cpp @@ -0,0 +1,22 @@ +//===- ActionCache.cpp ------------------------------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "llvm/CAS/ActionCache.h" +#include "llvm/CAS/CASID.h" +#include "llvm/CAS/ObjectStore.h" + +using namespace llvm; +using namespace llvm::cas; + +void ActionCache::anchor() {} + +CacheKey::CacheKey(const CASID &ID) : Key(toStringRef(ID.getHash()).str()) {} +CacheKey::CacheKey(const ObjectProxy &Proxy) + : CacheKey(Proxy.getCAS(), Proxy.getRef()) {} +CacheKey::CacheKey(const ObjectStore &CAS, const ObjectRef &Ref) + : Key(toStringRef(CAS.getID(Ref).getHash())) {} |