[cxx-interop] Remove symbolic import mode

Importing C++ class templates in symbolic mode has proven to be problematic in interaction with other compiler features, and it isn't used widely. This change removes the feature.

rdar://150528798
This commit is contained in:
Egor Zhdan
2025-05-02 18:43:09 +01:00
parent 9de2419153
commit b51cfa5c76
20 changed files with 14 additions and 857 deletions

View File

@@ -2020,11 +2020,6 @@ clang::CXXMethodDecl *SwiftDeclSynthesizer::synthesizeCXXForwardingMethod(
assert(!method->isStatic() ||
method->getNameInfo().getName().getCXXOverloadedOperator() ==
clang::OO_Call);
// When emitting symbolic decls, the method might not have a concrete
// record type as this type.
if (ImporterImpl.importSymbolicCXXDecls && !method->isStatic() &&
!method->getThisType()->getPointeeCXXRecordDecl())
return nullptr;
// Create a new method in the derived class that calls the base method.
clang::DeclarationName name = method->getNameInfo().getName();