Skip to content

Commit 2ac4aa6

Browse files
committed
[cxx-interop] NFC: use a CxxShim name constant
1 parent 49d67fd commit 2ac4aa6

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
@@ -4157,7 +4157,7 @@ void ClangModuleUnit::getImportedModulesForLookup(
41574157
// definitions of Swift protocols that C++ types might conform to, such as
41584158
// CxxSequence.
41594159
if (owner.SwiftContext.LangOpts.EnableCXXInterop &&
4160-
requiresCPlusPlus(clangModule) && clangModule->Name != "CxxShim") {
4160+
requiresCPlusPlus(clangModule) && clangModule->Name != CXX_SHIM_NAME) {
41614161
auto *cxxModule =
41624162
owner.SwiftContext.getModuleByIdentifier(owner.SwiftContext.Id_Cxx);
41634163
if (cxxModule)
@@ -4733,7 +4733,7 @@ DeclRefExpr *getInteropStaticCastDeclRefExpr(ASTContext &ctx,
47334733
}
47344734

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

0 commit comments

Comments
 (0)