Преглед изворни кода

Follow-up to #4487 to fix file names (#4520)

This switches from `int_store*` to `int*` as this file contains both the
ID and the store for integers.

This was supposed to be added to #4487 before merging, apologies for
missing that.
Chandler Carruth пре 1 година
родитељ
комит
f17939e252

+ 7 - 7
toolchain/base/BUILD

@@ -91,9 +91,9 @@ cc_test(
 )
 
 cc_library(
-    name = "int_store",
-    srcs = ["int_store.cpp"],
-    hdrs = ["int_store.h"],
+    name = "int",
+    srcs = ["int.cpp"],
+    hdrs = ["int.h"],
     deps = [
         ":index_base",
         ":mem_usage",
@@ -108,11 +108,11 @@ cc_library(
 )
 
 cc_test(
-    name = "int_store_test",
+    name = "int_test",
     size = "small",
-    srcs = ["int_store_test.cpp"],
+    srcs = ["int_test.cpp"],
     deps = [
-        ":int_store",
+        ":int",
         "//testing/base:gtest_main",
         "//testing/base:test_raw_ostream",
         "//toolchain/testing:yaml_test_helpers",
@@ -124,7 +124,7 @@ cc_library(
     name = "shared_value_stores",
     hdrs = ["shared_value_stores.h"],
     deps = [
-        ":int_store",
+        ":int",
         ":mem_usage",
         ":value_ids",
         ":value_store",

+ 1 - 1
toolchain/base/int_store.cpp → toolchain/base/int.cpp

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "toolchain/base/int_store.h"
+#include "toolchain/base/int.h"
 
 namespace Carbon {
 

+ 3 - 3
toolchain/base/int_store.h → toolchain/base/int.h

@@ -2,8 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef CARBON_TOOLCHAIN_BASE_INT_STORE_H_
-#define CARBON_TOOLCHAIN_BASE_INT_STORE_H_
+#ifndef CARBON_TOOLCHAIN_BASE_INT_H_
+#define CARBON_TOOLCHAIN_BASE_INT_H_
 
 #include "common/check.h"
 #include "llvm/ADT/APFloat.h"
@@ -425,4 +425,4 @@ constexpr IntStore::APIntId IntStore::APIntId::Invalid(
 
 }  // namespace Carbon
 
-#endif  // CARBON_TOOLCHAIN_BASE_INT_STORE_H_
+#endif  // CARBON_TOOLCHAIN_BASE_INT_H_

+ 1 - 1
toolchain/base/int_store_test.cpp → toolchain/base/int_test.cpp

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "toolchain/base/int_store.h"
+#include "toolchain/base/int.h"
 
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>

+ 1 - 1
toolchain/base/shared_value_stores.h

@@ -5,7 +5,7 @@
 #ifndef CARBON_TOOLCHAIN_BASE_SHARED_VALUE_STORES_H_
 #define CARBON_TOOLCHAIN_BASE_SHARED_VALUE_STORES_H_
 
-#include "toolchain/base/int_store.h"
+#include "toolchain/base/int.h"
 #include "toolchain/base/mem_usage.h"
 #include "toolchain/base/value_ids.h"
 #include "toolchain/base/value_store.h"

+ 4 - 4
toolchain/sem_ir/BUILD

@@ -36,7 +36,7 @@ cc_library(
         "//common:check",
         "//common:ostream",
         "//toolchain/base:index_base",
-        "//toolchain/base:int_store",
+        "//toolchain/base:int",
         "//toolchain/base:shared_value_stores",
         "//toolchain/base:value_ids",
         "//toolchain/diagnostics:diagnostic_emitter",
@@ -56,7 +56,7 @@ cc_library(
     deps = [
         "//common:check",
         "//common:enum_base",
-        "//toolchain/base:int_store",
+        "//toolchain/base:int",
         "//toolchain/parse:node_kind",
         "//toolchain/sem_ir:builtin_inst_kind",
         "//toolchain/sem_ir:ids",
@@ -78,7 +78,7 @@ cc_library(
         "//common:ostream",
         "//common:struct_reflection",
         "//toolchain/base:index_base",
-        "//toolchain/base:int_store",
+        "//toolchain/base:int",
         "//toolchain/base:value_store",
         "@llvm-project//llvm:Support",
     ],
@@ -133,7 +133,7 @@ cc_library(
         "//common:map",
         "//common:ostream",
         "//common:set",
-        "//toolchain/base:int_store",
+        "//toolchain/base:int",
         "//toolchain/base:kind_switch",
         "//toolchain/base:shared_value_stores",
         "//toolchain/base:value_ids",

+ 1 - 1
toolchain/sem_ir/file.h

@@ -10,7 +10,7 @@
 #include "llvm/ADT/iterator_range.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/FormatVariadic.h"
-#include "toolchain/base/int_store.h"
+#include "toolchain/base/int.h"
 #include "toolchain/base/shared_value_stores.h"
 #include "toolchain/base/value_store.h"
 #include "toolchain/base/yaml.h"

+ 1 - 1
toolchain/sem_ir/id_kind.h

@@ -7,7 +7,7 @@
 
 #include <algorithm>
 
-#include "toolchain/base/int_store.h"
+#include "toolchain/base/int.h"
 #include "toolchain/sem_ir/ids.h"
 
 namespace Carbon::SemIR {

+ 1 - 1
toolchain/sem_ir/inst.h

@@ -13,7 +13,7 @@
 #include "common/ostream.h"
 #include "common/struct_reflection.h"
 #include "toolchain/base/index_base.h"
-#include "toolchain/base/int_store.h"
+#include "toolchain/base/int.h"
 #include "toolchain/base/value_store.h"
 #include "toolchain/sem_ir/block_value_store.h"
 #include "toolchain/sem_ir/builtin_inst_kind.h"

+ 1 - 1
toolchain/sem_ir/typed_insts.h

@@ -5,7 +5,7 @@
 #ifndef CARBON_TOOLCHAIN_SEM_IR_TYPED_INSTS_H_
 #define CARBON_TOOLCHAIN_SEM_IR_TYPED_INSTS_H_
 
-#include "toolchain/base/int_store.h"
+#include "toolchain/base/int.h"
 #include "toolchain/parse/node_ids.h"
 #include "toolchain/sem_ir/builtin_inst_kind.h"
 #include "toolchain/sem_ir/ids.h"