diff --git a/toolchain/base/BUILD b/toolchain/base/BUILD index 296b36d4853c..a8fd57b7a092 100644 --- a/toolchain/base/BUILD +++ b/toolchain/base/BUILD @@ -7,6 +7,20 @@ load("llvm_tools.bzl", "LLVM_MAIN_TOOLS", "generate_llvm_tools_def") package(default_visibility = ["//visibility:public"]) +cc_library( + name = "block_value_store", + hdrs = ["block_value_store.h"], + deps = [ + ":mem_usage", + ":value_store", + ":yaml", + "//common:check", + "//common:hashing", + "//common:set", + "@llvm-project//llvm:Support", + ], +) + cc_library( name = "canonical_value_store", hdrs = ["canonical_value_store.h"], diff --git a/toolchain/sem_ir/block_value_store.h b/toolchain/base/block_value_store.h similarity index 97% rename from toolchain/sem_ir/block_value_store.h rename to toolchain/base/block_value_store.h index f14d60b5b3f9..54d7fc95fb53 100644 --- a/toolchain/sem_ir/block_value_store.h +++ b/toolchain/base/block_value_store.h @@ -2,8 +2,8 @@ // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -#ifndef CARBON_TOOLCHAIN_SEM_IR_BLOCK_VALUE_STORE_H_ -#define CARBON_TOOLCHAIN_SEM_IR_BLOCK_VALUE_STORE_H_ +#ifndef CARBON_TOOLCHAIN_BASE_BLOCK_VALUE_STORE_H_ +#define CARBON_TOOLCHAIN_BASE_BLOCK_VALUE_STORE_H_ #include @@ -150,4 +150,4 @@ class BlockValueStore::KeyContext } // namespace Carbon::SemIR -#endif // CARBON_TOOLCHAIN_SEM_IR_BLOCK_VALUE_STORE_H_ +#endif // CARBON_TOOLCHAIN_BASE_BLOCK_VALUE_STORE_H_ diff --git a/toolchain/sem_ir/BUILD b/toolchain/sem_ir/BUILD index c6d47a6b5512..74bef33808ce 100644 --- a/toolchain/sem_ir/BUILD +++ b/toolchain/sem_ir/BUILD @@ -6,20 +6,6 @@ load("//bazel/cc_rules:defs.bzl", "cc_library", "cc_test") package(default_visibility = ["//visibility:public"]) -cc_library( - name = "block_value_store", - hdrs = ["block_value_store.h"], - deps = [ - "//common:check", - "//common:hashing", - "//common:set", - "//toolchain/base:mem_usage", - "//toolchain/base:value_store", - "//toolchain/base:yaml", - "@llvm-project//llvm:Support", - ], -) - cc_library( name = "typed_insts", srcs = [ @@ -124,7 +110,6 @@ cc_library( "builtin_function_kind.def", ], deps = [ - ":block_value_store", ":clang_decl", ":typed_insts", "//common:check", @@ -136,6 +121,7 @@ cc_library( "//common:raw_string_ostream", "//common:set", "//common:struct_reflection", + "//toolchain/base:block_value_store", "//toolchain/base:canonical_value_store", "//toolchain/base:index_base", "//toolchain/base:int", diff --git a/toolchain/sem_ir/inst.h b/toolchain/sem_ir/inst.h index 366cc2a3606e..3e00968c73e5 100644 --- a/toolchain/sem_ir/inst.h +++ b/toolchain/sem_ir/inst.h @@ -13,10 +13,10 @@ #include "common/ostream.h" #include "common/raw_string_ostream.h" #include "common/struct_reflection.h" +#include "toolchain/base/block_value_store.h" #include "toolchain/base/index_base.h" #include "toolchain/base/int.h" #include "toolchain/base/value_store.h" -#include "toolchain/sem_ir/block_value_store.h" #include "toolchain/sem_ir/id_kind.h" #include "toolchain/sem_ir/inst_kind.h" #include "toolchain/sem_ir/singleton_insts.h" diff --git a/toolchain/sem_ir/struct_type_field.h b/toolchain/sem_ir/struct_type_field.h index 43d20a9788e7..709563cf5a6e 100644 --- a/toolchain/sem_ir/struct_type_field.h +++ b/toolchain/sem_ir/struct_type_field.h @@ -5,7 +5,7 @@ #ifndef CARBON_TOOLCHAIN_SEM_IR_STRUCT_TYPE_FIELD_H_ #define CARBON_TOOLCHAIN_SEM_IR_STRUCT_TYPE_FIELD_H_ -#include "toolchain/sem_ir/block_value_store.h" +#include "toolchain/base/block_value_store.h" #include "toolchain/sem_ir/ids.h" namespace Carbon::SemIR {