Просмотр исходного кода

Rename `check/import_cpp.*` to `check/cpp_import.*` to group C++ interop logic in `check` (#6074)

See #6065 for context.
Boaz Brickner 7 месяцев назад
Родитель
Сommit
dfe9ffd369

+ 2 - 2
toolchain/check/BUILD

@@ -22,6 +22,7 @@ cc_library(
         "control_flow.cpp",
         "convert.cpp",
         "cpp_custom_type_mapping.cpp",
+        "cpp_import.cpp",
         "cpp_overload_resolution.cpp",
         "cpp_thunk.cpp",
         "cpp_type_mapping.cpp",
@@ -39,7 +40,6 @@ cc_library(
         "impl_validation.cpp",
         "implicit_type_impls.cpp",
         "import.cpp",
-        "import_cpp.cpp",
         "import_ref.cpp",
         "inst.cpp",
         "inst_block_stack.cpp",
@@ -71,6 +71,7 @@ cc_library(
         "control_flow.h",
         "convert.h",
         "cpp_custom_type_mapping.h",
+        "cpp_import.h",
         "cpp_overload_resolution.h",
         "cpp_thunk.h",
         "cpp_type_mapping.h",
@@ -90,7 +91,6 @@ cc_library(
         "impl_validation.h",
         "implicit_type_impls.h",
         "import.h",
-        "import_cpp.h",
         "import_ref.h",
         "inst.h",
         "inst_block_stack.h",

+ 1 - 1
toolchain/check/check.cpp

@@ -11,9 +11,9 @@
 #include "common/map.h"
 #include "toolchain/check/check_unit.h"
 #include "toolchain/check/context.h"
+#include "toolchain/check/cpp_import.h"
 #include "toolchain/check/diagnostic_emitter.h"
 #include "toolchain/check/diagnostic_helpers.h"
-#include "toolchain/check/import_cpp.h"
 #include "toolchain/diagnostics/diagnostic.h"
 #include "toolchain/diagnostics/diagnostic_consumer.h"
 #include "toolchain/diagnostics/format_providers.h"

+ 1 - 1
toolchain/check/check_unit.cpp

@@ -16,6 +16,7 @@
 #include "llvm/Support/VirtualFileSystem.h"
 #include "toolchain/base/fixed_size_value_store.h"
 #include "toolchain/base/kind_switch.h"
+#include "toolchain/check/cpp_import.h"
 #include "toolchain/check/diagnostic_helpers.h"
 #include "toolchain/check/generic.h"
 #include "toolchain/check/handle.h"
@@ -23,7 +24,6 @@
 #include "toolchain/check/impl_lookup.h"
 #include "toolchain/check/impl_validation.h"
 #include "toolchain/check/import.h"
-#include "toolchain/check/import_cpp.h"
 #include "toolchain/check/import_ref.h"
 #include "toolchain/check/inst.h"
 #include "toolchain/check/node_id_traversal.h"

+ 1 - 1
toolchain/check/import_cpp.cpp → toolchain/check/cpp_import.cpp

@@ -2,7 +2,7 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#include "toolchain/check/import_cpp.h"
+#include "toolchain/check/cpp_import.h"
 
 #include <memory>
 #include <optional>

+ 3 - 3
toolchain/check/import_cpp.h → toolchain/check/cpp_import.h

@@ -2,8 +2,8 @@
 // Exceptions. See /LICENSE for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-#ifndef CARBON_TOOLCHAIN_CHECK_IMPORT_CPP_H_
-#define CARBON_TOOLCHAIN_CHECK_IMPORT_CPP_H_
+#ifndef CARBON_TOOLCHAIN_CHECK_CPP_IMPORT_H_
+#define CARBON_TOOLCHAIN_CHECK_CPP_IMPORT_H_
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/IntrusiveRefCntPtr.h"
@@ -55,4 +55,4 @@ auto ImportClassDefinitionForClangDecl(Context& context, SemIR::LocId loc_id,
 
 }  // namespace Carbon::Check
 
-#endif  // CARBON_TOOLCHAIN_CHECK_IMPORT_CPP_H_
+#endif  // CARBON_TOOLCHAIN_CHECK_CPP_IMPORT_H_

+ 1 - 1
toolchain/check/cpp_overload_resolution.cpp

@@ -6,8 +6,8 @@
 
 #include "clang/Sema/Overload.h"
 #include "clang/Sema/Sema.h"
+#include "toolchain/check/cpp_import.h"
 #include "toolchain/check/cpp_type_mapping.h"
-#include "toolchain/check/import_cpp.h"
 
 namespace Carbon::Check {
 

+ 1 - 1
toolchain/check/name_lookup.cpp

@@ -6,9 +6,9 @@
 
 #include <optional>
 
+#include "toolchain/check/cpp_import.h"
 #include "toolchain/check/generic.h"
 #include "toolchain/check/import.h"
-#include "toolchain/check/import_cpp.h"
 #include "toolchain/check/import_ref.h"
 #include "toolchain/check/member_access.h"
 #include "toolchain/check/type_completion.h"

+ 1 - 1
toolchain/check/operator.cpp

@@ -8,8 +8,8 @@
 
 #include "toolchain/check/call.h"
 #include "toolchain/check/context.h"
+#include "toolchain/check/cpp_import.h"
 #include "toolchain/check/generic.h"
-#include "toolchain/check/import_cpp.h"
 #include "toolchain/check/member_access.h"
 #include "toolchain/check/name_lookup.h"
 #include "toolchain/sem_ir/class.h"

+ 1 - 1
toolchain/check/type_completion.cpp

@@ -6,8 +6,8 @@
 
 #include "llvm/ADT/SmallVector.h"
 #include "toolchain/base/kind_switch.h"
+#include "toolchain/check/cpp_import.h"
 #include "toolchain/check/generic.h"
-#include "toolchain/check/import_cpp.h"
 #include "toolchain/check/inst.h"
 #include "toolchain/check/type.h"
 #include "toolchain/diagnostics/format_providers.h"