Handle missing members in protocols as well.

This means both not crashing when we deserialize the protocol but
also emitting correct offsets for dynamic dispatch through the
protocol's witness table.

Also fix a bug with vtable and witness table slots for
materializeForSet accessors for properties that can't be
imported. Because materializeForSet doesn't have the type of the
property in its signature, it was taking a different failure path from
everything else, and that failure path didn't properly set the name or
flags for the missing member.

Finishes rdar://problem/31878396
This commit is contained in:
Jordan Rose
2017-05-09 18:00:21 -07:00
parent 384b2a674b
commit aeb0fedad1
6 changed files with 200 additions and 19 deletions

View File

@@ -143,6 +143,10 @@ public:
asDerived().addMethod(func);
}
void visitMissingMemberDecl(MissingMemberDecl *placeholder) {
asDerived().addPlaceholder(placeholder);
}
void visitAssociatedTypeDecl(AssociatedTypeDecl *td) {
// We already visited these in the first pass.
}