Sema: Lift restriction on @objc categories of concrete subclasses of generic classes

In-place initialization means the class has a symbol we can reference
from the category, so there's nothing to do on the IRGen side.

For JIT mode, we just need to realize the class metadata by calling an
accessor instead of directly referencing the symbol though.
This commit is contained in:
Slava Pestov
2018-08-14 18:04:33 -07:00
parent 24a9a5156c
commit 4069fa68db
12 changed files with 76 additions and 83 deletions

View File

@@ -3431,19 +3431,6 @@ ClassDecl::findImplementingMethod(const AbstractFunctionDecl *Method) const {
return nullptr;
}
ClassDecl *ClassDecl::getGenericAncestor() const {
ClassDecl *current = const_cast<ClassDecl *>(this);
while (current) {
if (current->isGenericContext())
return current;
current = current->getSuperclassDecl();
}
return nullptr;
}
EnumCaseDecl *EnumCaseDecl::create(SourceLoc CaseLoc,
ArrayRef<EnumElementDecl *> Elements,
DeclContext *DC) {