diff --git a/toolchain/common/BUILD b/toolchain/base/BUILD similarity index 100% rename from toolchain/common/BUILD rename to toolchain/base/BUILD diff --git a/toolchain/common/index_base.h b/toolchain/base/index_base.h similarity index 94% rename from toolchain/common/index_base.h rename to toolchain/base/index_base.h index 2d5f7cd48049..4c156c93dc22 100644 --- a/toolchain/common/index_base.h +++ b/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 @@ -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_ diff --git a/toolchain/common/pretty_stack_trace_function.h b/toolchain/base/pretty_stack_trace_function.h similarity index 78% rename from toolchain/common/pretty_stack_trace_function.h rename to toolchain/base/pretty_stack_trace_function.h index a6b7e9a29745..92eff6199521 100644 --- a/toolchain/common/pretty_stack_trace_function.h +++ b/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 @@ -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_ diff --git a/toolchain/common/yaml_test_helpers.cpp b/toolchain/base/yaml_test_helpers.cpp similarity index 98% rename from toolchain/common/yaml_test_helpers.cpp rename to toolchain/base/yaml_test_helpers.cpp index 5566aedfc1c3..8271f4e03988 100644 --- a/toolchain/common/yaml_test_helpers.cpp +++ b/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" diff --git a/toolchain/common/yaml_test_helpers.h b/toolchain/base/yaml_test_helpers.h similarity index 96% rename from toolchain/common/yaml_test_helpers.h rename to toolchain/base/yaml_test_helpers.h index 507252295d9c..1e4c4ebaa014 100644 --- a/toolchain/common/yaml_test_helpers.h +++ b/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 #include @@ -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_ diff --git a/toolchain/driver/BUILD b/toolchain/driver/BUILD index ec5cc9b89900..a1ec4c3e29c5 100644 --- a/toolchain/driver/BUILD +++ b/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", diff --git a/toolchain/driver/driver_test.cpp b/toolchain/driver/driver_test.cpp index aeccc6dc8d81..2bab8c39bc11 100644 --- a/toolchain/driver/driver_test.cpp +++ b/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 { diff --git a/toolchain/lexer/BUILD b/toolchain/lexer/BUILD index aa6d804e62f5..08db2a839696 100644 --- a/toolchain/lexer/BUILD +++ b/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", diff --git a/toolchain/lexer/tokenized_buffer.h b/toolchain/lexer/tokenized_buffer.h index dda855c589f6..afd3abe43d70 100644 --- a/toolchain/lexer/tokenized_buffer.h +++ b/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" diff --git a/toolchain/lexer/tokenized_buffer_test.cpp b/toolchain/lexer/tokenized_buffer_test.cpp index 0656151c481f..18d73222cd0c 100644 --- a/toolchain/lexer/tokenized_buffer_test.cpp +++ b/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" diff --git a/toolchain/parser/BUILD b/toolchain/parser/BUILD index 5d32c2d6f37b..1f7c5d867241 100644 --- a/toolchain/parser/BUILD +++ b/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", diff --git a/toolchain/parser/parse_tree.cpp b/toolchain/parser/parse_tree.cpp index 1321c48d8c41..86638b2f0e93 100644 --- a/toolchain/parser/parse_tree.cpp +++ b/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" diff --git a/toolchain/parser/parse_tree_test.cpp b/toolchain/parser/parse_tree_test.cpp index d4039f222211..c4e1db2075bc 100644 --- a/toolchain/parser/parse_tree_test.cpp +++ b/toolchain/parser/parse_tree_test.cpp @@ -10,7 +10,7 @@ #include #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" diff --git a/toolchain/semantics/BUILD b/toolchain/semantics/BUILD index 36243ab0ac9e..05e5aa6726b5 100644 --- a/toolchain/semantics/BUILD +++ b/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", diff --git a/toolchain/semantics/semantics_ir.cpp b/toolchain/semantics/semantics_ir.cpp index 3b8ba09fa985..24502fbe90ea 100644 --- a/toolchain/semantics/semantics_ir.cpp +++ b/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" diff --git a/toolchain/semantics/semantics_ir_test.cpp b/toolchain/semantics/semantics_ir_test.cpp index e8ee468a9888..5eeef88bea4c 100644 --- a/toolchain/semantics/semantics_ir_test.cpp +++ b/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 { diff --git a/toolchain/semantics/semantics_node.h b/toolchain/semantics/semantics_node.h index 2c775c38c0e3..1b93608c1d0b 100644 --- a/toolchain/semantics/semantics_node.h +++ b/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"