Skip to content

Commit da8460e

Browse files
committed
Add workaround for implicit copy constructor generation problem.
Some versions of Clang seem to generate a non-working implicit copy constructor for `RemoteRef<BuiltinTypeDescriptor>`, which results in all the reflection tests failing. Fix by declaring it explicitly. rdar://101240198
1 parent 7c3a63b commit da8460e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/swift/Remote/MetadataReader.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ class RemoteRef {
6363
RemoteRef()
6464
: Address(0), LocalBuffer(nullptr) {}
6565

66+
// <rdar://99715218> Some versions of clang++ sometimes fail to generate the
67+
// copy constructor for this type correctly - add a workaround
68+
RemoteRef(const RemoteRef &other)
69+
: Address(other.Address), LocalBuffer(other.LocalBuffer) {}
70+
6671
/*implicit*/
6772
RemoteRef(std::nullptr_t _) : RemoteRef() {}
6873

0 commit comments

Comments
 (0)