A generic class can inherit from objc and so the devirtualizer needs to emit a default case

rdar://23228386
This commit is contained in:
Arnold Schwaighofer
2016-02-01 20:27:02 -08:00
parent f6866b4ae7
commit ac423ebe97
2 changed files with 54 additions and 2 deletions

View File

@@ -220,8 +220,7 @@ static bool isDefaultCaseKnown(ClassHierarchyAnalysis *CHA,
// If the class has an @objc ancestry it can be dynamically subclassed and we
// can't therefore statically know the default case.
auto Ancestry = CD->checkObjCAncestry();
if (Ancestry != ObjCClassKind::NonObjC &&
Ancestry != ObjCClassKind::ObjCMembers)
if (Ancestry != ObjCClassKind::NonObjC)
return false;
// Without an associated context we cannot perform any