
ActionCache is used to store a mapping from CASID to CASID. The current implementation of the ActionCache can only be used to associate the key/value from the same hash context. ActionCache has two operations: `put` to store the key/value and `get` to lookup the key/value mapping. ActionCache uses the same TrieRawHashMap data structure to store the mapping, where is CASID of the key is the hash to index the map. While CASIDs for key/value are often associcate with actual CAS ObjectStore, it doesn't provide the guarantee of the existence of such object in any ObjectStore.
22 lines
737 B
C++
22 lines
737 B
C++
//===- CASTestConfig.cpp --------------------------------------------------===//
|
|
//
|
|
// 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 "CASTestConfig.h"
|
|
#include "llvm/CAS/ObjectStore.h"
|
|
#include "gtest/gtest.h"
|
|
|
|
using namespace llvm;
|
|
using namespace llvm::cas;
|
|
|
|
static CASTestingEnv createInMemory(int I) {
|
|
return CASTestingEnv{createInMemoryCAS(), createInMemoryActionCache()};
|
|
}
|
|
|
|
INSTANTIATE_TEST_SUITE_P(InMemoryCAS, CASTest,
|
|
::testing::Values(createInMemory));
|