Skip to content

Commit dcdcd13

Browse files
committed
[cxx-interop] Workaround build error in SwiftCompilerSources
Certain build configurations of SwiftCompilerSources now incorrectly treat `BridgedSwiftObject` as a non-copyable type, causing compiler errors. This is a short-term workaround for these errors. rdar://138924133
1 parent fcd6985 commit dcdcd13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7656,6 +7656,10 @@ static bool hasCopyTypeOperations(const clang::CXXRecordDecl *decl) {
76567656
namespaceContext->getName() == "__gnu_cxx" && decl->getIdentifier() &&
76577657
decl->getName() == "__normal_iterator")
76587658
return true;
7659+
// Hack for certain build configurations of SwiftCompilerSources
7660+
// (rdar://138924133).
7661+
if (decl->getIdentifier() && decl->getName() == "BridgedSwiftObject")
7662+
return true;
76597663

76607664
// If we have no way of copying the type we can't import the class
76617665
// at all because we cannot express the correct semantics as a swift

0 commit comments

Comments
 (0)