Skip to content

Commit b98d7a5

Browse files
authored
Merge pull request #71310 from apple/egorzhdan/nfc-cxxshim-name
[cxx-interop] NFC: use a CxxShim name constant
2 parents 5aaa17f + 2ac4aa6 commit b98d7a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4175,7 +4175,7 @@ void ClangModuleUnit::getImportedModulesForLookup(
41754175
// definitions of Swift protocols that C++ types might conform to, such as
41764176
// CxxSequence.
41774177
if (owner.SwiftContext.LangOpts.EnableCXXInterop &&
4178-
requiresCPlusPlus(clangModule) && clangModule->Name != "CxxShim") {
4178+
requiresCPlusPlus(clangModule) && clangModule->Name != CXX_SHIM_NAME) {
41794179
auto *cxxModule =
41804180
owner.SwiftContext.getModuleByIdentifier(owner.SwiftContext.Id_Cxx);
41814181
if (cxxModule)
@@ -4753,7 +4753,7 @@ DeclRefExpr *getInteropStaticCastDeclRefExpr(ASTContext &ctx,
47534753
}
47544754

47554755
// Lookup our static cast helper function in the C++ shim module.
4756-
auto wrapperModule = ctx.getLoadedModule(ctx.getIdentifier("CxxShim"));
4756+
auto wrapperModule = ctx.getLoadedModule(ctx.getIdentifier(CXX_SHIM_NAME));
47574757
assert(wrapperModule &&
47584758
"CxxShim module is required when using members of a base class. "
47594759
"Make sure you `import CxxShim`.");

0 commit comments

Comments
 (0)