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
13using namespace llvm;
14using namespace llvm::cas;
15
16void ActionCache::anchor() {}
17
18CacheKey::CacheKey(const CASID &ID) : Key(toStringRef(Input: ID.getHash()).str()) {}
19CacheKey::CacheKey(const ObjectProxy &Proxy)
20 : CacheKey(Proxy.getCAS(), Proxy.getRef()) {}
21CacheKey::CacheKey(const ObjectStore &CAS, const ObjectRef &Ref)
22 : Key(toStringRef(Input: CAS.getID(Ref).getHash())) {}
23