| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "llvm/CAS/ActionCache.h" |
| 10 | #include "llvm/CAS/CASID.h" |
| 11 | #include "llvm/CAS/ObjectStore.h" |
| 12 | |
| 13 | using namespace llvm; |
| 14 | using namespace llvm::cas; |
| 15 | |
| 16 | void ActionCache::anchor() {} |
| 17 | |
| 18 | CacheKey::CacheKey(const CASID &ID) : Key(toStringRef(Input: ID.getHash()).str()) {} |
| 19 | CacheKey::CacheKey(const ObjectProxy &Proxy) |
| 20 | : CacheKey(Proxy.getCAS(), Proxy.getRef()) {} |
| 21 | CacheKey::CacheKey(const ObjectStore &CAS, const ObjectRef &Ref) |
| 22 | : Key(toStringRef(Input: CAS.getID(Ref).getHash())) {} |
| 23 |