Przeglądaj źródła

Rename //toolchain/common to base (#3101)

Renaming per #3100
Jon Ross-Perkins 2 lat temu
rodzic
commit
a692fb89a3

+ 0 - 0
toolchain/common/BUILD → toolchain/base/BUILD


+ 3 - 3
toolchain/common/index_base.h → toolchain/base/index_base.h

@@ -2,8 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef CARBON_TOOLCHAIN_COMMON_INDEX_BASE_H_
-#define CARBON_TOOLCHAIN_COMMON_INDEX_BASE_H_
+#ifndef CARBON_TOOLCHAIN_BASE_INDEX_BASE_H_
+#define CARBON_TOOLCHAIN_BASE_INDEX_BASE_H_
 
 #include <type_traits>
 
@@ -80,4 +80,4 @@ auto operator>=(IndexType lhs, IndexType rhs) -> bool {
 
 }  // namespace Carbon
 
-#endif  // CARBON_TOOLCHAIN_COMMON_INDEX_BASE_H_
+#endif  // CARBON_TOOLCHAIN_BASE_INDEX_BASE_H_

+ 3 - 3
toolchain/common/pretty_stack_trace_function.h → toolchain/base/pretty_stack_trace_function.h

@@ -2,8 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef CARBON_TOOLCHAIN_COMMON_PRETTY_STACK_TRACE_FUNCTION_H_
-#define CARBON_TOOLCHAIN_COMMON_PRETTY_STACK_TRACE_FUNCTION_H_
+#ifndef CARBON_TOOLCHAIN_BASE_PRETTY_STACK_TRACE_FUNCTION_H_
+#define CARBON_TOOLCHAIN_BASE_PRETTY_STACK_TRACE_FUNCTION_H_
 
 #include <functional>
 
@@ -25,4 +25,4 @@ class PrettyStackTraceFunction : public llvm::PrettyStackTraceEntry {
 
 }  // namespace Carbon
 
-#endif  // CARBON_TOOLCHAIN_COMMON_PRETTY_STACK_TRACE_FUNCTION_H_
+#endif  // CARBON_TOOLCHAIN_BASE_PRETTY_STACK_TRACE_FUNCTION_H_

+ 1 - 1
toolchain/common/yaml_test_helpers.cpp → toolchain/base/yaml_test_helpers.cpp

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "toolchain/common/yaml_test_helpers.h"
+#include "toolchain/base/yaml_test_helpers.h"
 
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/YAMLParser.h"

+ 3 - 3
toolchain/common/yaml_test_helpers.h → toolchain/base/yaml_test_helpers.h

@@ -44,8 +44,8 @@
 // On match failure, Yaml::Values are printed as C++ code that can be used to
 // recreate the value, for easy copy-pasting into test expectations.
 
-#ifndef CARBON_TOOLCHAIN_COMMON_YAML_TEST_HELPERS_H_
-#define CARBON_TOOLCHAIN_COMMON_YAML_TEST_HELPERS_H_
+#ifndef CARBON_TOOLCHAIN_BASE_YAML_TEST_HELPERS_H_
+#define CARBON_TOOLCHAIN_BASE_YAML_TEST_HELPERS_H_
 
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
@@ -146,4 +146,4 @@ MATCHER_P(Scalar, value,
 
 }  // namespace Carbon::Testing::Yaml
 
-#endif  // CARBON_TOOLCHAIN_COMMON_YAML_TEST_HELPERS_H_
+#endif  // CARBON_TOOLCHAIN_BASE_YAML_TEST_HELPERS_H_

+ 1 - 1
toolchain/driver/BUILD

@@ -47,7 +47,7 @@ cc_test(
         ":driver",
         "//testing/util:gtest_main",
         "//testing/util:test_raw_ostream",
-        "//toolchain/common:yaml_test_helpers",
+        "//toolchain/base:yaml_test_helpers",
         "//toolchain/diagnostics:diagnostic_emitter",
         "//toolchain/lexer:tokenized_buffer_test_helpers",
         "@com_google_googletest//:gtest",

+ 1 - 1
toolchain/driver/driver_test.cpp

@@ -11,7 +11,7 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/SourceMgr.h"
 #include "testing/util/test_raw_ostream.h"
-#include "toolchain/common/yaml_test_helpers.h"
+#include "toolchain/base/yaml_test_helpers.h"
 #include "toolchain/diagnostics/diagnostic_emitter.h"
 
 namespace Carbon::Testing {

+ 2 - 2
toolchain/lexer/BUILD

@@ -182,7 +182,7 @@ cc_library(
         "//common:check",
         "//common:ostream",
         "//common:string_helpers",
-        "//toolchain/common:index_base",
+        "//toolchain/base:index_base",
         "//toolchain/diagnostics:diagnostic_emitter",
         "//toolchain/source:source_buffer",
         "@llvm-project//llvm:Support",
@@ -210,7 +210,7 @@ cc_test(
         ":tokenized_buffer_test_helpers",
         "//testing/util:gtest_main",
         "//testing/util:test_raw_ostream",
-        "//toolchain/common:yaml_test_helpers",
+        "//toolchain/base:yaml_test_helpers",
         "//toolchain/diagnostics:diagnostic_emitter",
         "//toolchain/diagnostics:mocks",
         "@com_google_googletest//:gtest",

+ 1 - 1
toolchain/lexer/tokenized_buffer.h

@@ -17,7 +17,7 @@
 #include "llvm/ADT/iterator.h"
 #include "llvm/ADT/iterator_range.h"
 #include "llvm/Support/raw_ostream.h"
-#include "toolchain/common/index_base.h"
+#include "toolchain/base/index_base.h"
 #include "toolchain/diagnostics/diagnostic_emitter.h"
 #include "toolchain/lexer/token_kind.h"
 #include "toolchain/source/source_buffer.h"

+ 1 - 1
toolchain/lexer/tokenized_buffer_test.cpp

@@ -16,7 +16,7 @@
 #include "llvm/Support/SourceMgr.h"
 #include "llvm/Support/raw_ostream.h"
 #include "testing/util/test_raw_ostream.h"
-#include "toolchain/common/yaml_test_helpers.h"
+#include "toolchain/base/yaml_test_helpers.h"
 #include "toolchain/diagnostics/diagnostic_emitter.h"
 #include "toolchain/diagnostics/mocks.h"
 #include "toolchain/lexer/tokenized_buffer_test_helpers.h"

+ 2 - 2
toolchain/parser/BUILD

@@ -47,7 +47,7 @@ cc_library(
         "//common:error",
         "//common:ostream",
         "//common:vlog",
-        "//toolchain/common:pretty_stack_trace_function",
+        "//toolchain/base:pretty_stack_trace_function",
         "//toolchain/diagnostics:diagnostic_emitter",
         "//toolchain/lexer:token_kind",
         "//toolchain/lexer:tokenized_buffer",
@@ -65,7 +65,7 @@ cc_test(
         "//common:ostream",
         "//testing/util:gtest_main",
         "//testing/util:test_raw_ostream",
-        "//toolchain/common:yaml_test_helpers",
+        "//toolchain/base:yaml_test_helpers",
         "//toolchain/diagnostics:diagnostic_emitter",
         "//toolchain/diagnostics:mocks",
         "//toolchain/lexer:tokenized_buffer",

+ 1 - 1
toolchain/parser/parse_tree.cpp

@@ -11,7 +11,7 @@
 #include "common/error.h"
 #include "llvm/ADT/Sequence.h"
 #include "llvm/ADT/SmallVector.h"
-#include "toolchain/common/pretty_stack_trace_function.h"
+#include "toolchain/base/pretty_stack_trace_function.h"
 #include "toolchain/lexer/tokenized_buffer.h"
 #include "toolchain/parser/parse_node_kind.h"
 #include "toolchain/parser/parser_context.h"

+ 1 - 1
toolchain/parser/parse_tree_test.cpp

@@ -10,7 +10,7 @@
 #include <forward_list>
 
 #include "testing/util/test_raw_ostream.h"
-#include "toolchain/common/yaml_test_helpers.h"
+#include "toolchain/base/yaml_test_helpers.h"
 #include "toolchain/diagnostics/diagnostic_emitter.h"
 #include "toolchain/diagnostics/mocks.h"
 #include "toolchain/lexer/tokenized_buffer.h"

+ 3 - 3
toolchain/semantics/BUILD

@@ -36,7 +36,7 @@ cc_library(
         ":semantics_node_kind",
         "//common:check",
         "//common:ostream",
-        "//toolchain/common:index_base",
+        "//toolchain/base:index_base",
         "//toolchain/parser:parse_tree",
         "@llvm-project//llvm:Support",
     ],
@@ -83,7 +83,7 @@ cc_library(
         "//common:check",
         "//common:ostream",
         "//common:vlog",
-        "//toolchain/common:pretty_stack_trace_function",
+        "//toolchain/base:pretty_stack_trace_function",
         "//toolchain/diagnostics:diagnostic_kind",
         "//toolchain/lexer:numeric_literal",
         "//toolchain/lexer:token_kind",
@@ -119,7 +119,7 @@ cc_test(
     deps = [
         "//testing/util:gtest_main",
         "//testing/util:test_raw_ostream",
-        "//toolchain/common:yaml_test_helpers",
+        "//toolchain/base:yaml_test_helpers",
         "//toolchain/driver",
         "@com_google_googletest//:gtest",
         "@llvm-project//llvm:Support",

+ 1 - 1
toolchain/semantics/semantics_ir.cpp

@@ -8,7 +8,7 @@
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/SaveAndRestore.h"
-#include "toolchain/common/pretty_stack_trace_function.h"
+#include "toolchain/base/pretty_stack_trace_function.h"
 #include "toolchain/parser/parse_tree_node_location_translator.h"
 #include "toolchain/semantics/semantics_builtin_kind.h"
 #include "toolchain/semantics/semantics_context.h"

+ 1 - 1
toolchain/semantics/semantics_ir_test.cpp

@@ -11,7 +11,7 @@
 #include "llvm/Support/VirtualFileSystem.h"
 #include "llvm/Support/raw_ostream.h"
 #include "testing/util/test_raw_ostream.h"
-#include "toolchain/common/yaml_test_helpers.h"
+#include "toolchain/base/yaml_test_helpers.h"
 #include "toolchain/driver/driver.h"
 
 namespace Carbon::Testing {

+ 1 - 1
toolchain/semantics/semantics_node.h

@@ -9,7 +9,7 @@
 
 #include "common/check.h"
 #include "common/ostream.h"
-#include "toolchain/common/index_base.h"
+#include "toolchain/base/index_base.h"
 #include "toolchain/parser/parse_tree.h"
 #include "toolchain/semantics/semantics_builtin_kind.h"
 #include "toolchain/semantics/semantics_node_kind.h"