SIL: Private methods of open resilient classes don't need to be public

Private methods of non-resilient classes can be referenced from
outside the module, but resilient classes build the vtable at
runtime so we don't need that hack there.
This commit is contained in:
Slava Pestov
2018-11-07 16:33:07 -05:00
parent 6e938f8359
commit de1ba80ffa
3 changed files with 16 additions and 0 deletions

View File

@@ -912,6 +912,8 @@ SubclassScope SILDeclRef::getSubclassScope() const {
case AccessLevel::Public:
return SubclassScope::Internal;
case AccessLevel::Open:
if (classType->isResilient())
return SubclassScope::Internal;
return SubclassScope::External;
}