SILGen: Use SILVTableVisitor instead of bespoke member traversal

This changes the order in which declarations are emitted.
It also means we no longer emit a vtable entry for the
materializeForSet of dynamic storage. Neither of these are
intended to have any functional effect.
This commit is contained in:
Slava Pestov
2017-03-23 18:16:05 -07:00
parent b42675c235
commit 1a9fe1fb74
13 changed files with 182 additions and 230 deletions

View File

@@ -772,12 +772,14 @@ SILDeclRef SILDeclRef::getNextOverriddenVTableEntry() const {
// @NSManaged property, then it won't be in the vtable.
if (overridden.getDecl()->hasClangNode())
return SILDeclRef();
if (overridden.getDecl()->getAttrs().hasAttribute<DynamicAttr>())
if (overridden.getDecl()->isDynamic())
return SILDeclRef();
if (auto *ovFD = dyn_cast<FuncDecl>(overridden.getDecl()))
if (auto *asd = ovFD->getAccessorStorageDecl()) {
if (asd->hasClangNode())
return SILDeclRef();
if (asd->isDynamic())
return SILDeclRef();
}
// If we overrode a decl from an extension, it won't be in a vtable