Skip to content

Commit 43ec6ad

Browse files
committed
Don't disable stripping the name when -disable-swift-bridge-attr is enabled
1 parent f782cba commit 43ec6ad

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,12 +1957,8 @@ namespace {
19571957

19581958
/// Determine whether the given Objective-C class, or any of its
19591959
/// superclasses, either has or inherits a swift_bridge attribute.
1960-
static bool hasOrInheritsSwiftBridgeAttr(
1961-
const clang::ObjCInterfaceDecl *objcClass,
1962-
bool DisableSwiftBridgeAttr) {
1963-
// If we have disabled the attribute just return that there is none.
1964-
if (DisableSwiftBridgeAttr)
1965-
return false;
1960+
static bool
1961+
hasOrInheritsSwiftBridgeAttr(const clang::ObjCInterfaceDecl *objcClass) {
19661962
do {
19671963
// Look at the definition, if there is one.
19681964
if (auto def = objcClass->getDefinition())
@@ -2486,8 +2482,7 @@ auto ClangImporter::Implementation::importFullName(
24862482
if (D->getDeclContext()->getRedeclContext()->isFileContext() &&
24872483
(isa<clang::TypeDecl>(D) ||
24882484
(isa<clang::ObjCInterfaceDecl>(D) &&
2489-
!hasOrInheritsSwiftBridgeAttr(cast<clang::ObjCInterfaceDecl>(D),
2490-
DisableSwiftBridgeAttr)) ||
2485+
!hasOrInheritsSwiftBridgeAttr(cast<clang::ObjCInterfaceDecl>(D))) ||
24912486
isa<clang::ObjCProtocolDecl>(D))) {
24922487
// Find the original declaration, from which we can determine
24932488
// the owning module.

0 commit comments

Comments
 (0)