[clang] RewriteObjCClassMetaData - remove superfluous null pointer check. NFCI.

We've already dereferenced the pointer and no other getClassInterface() calls appear to bother with such a check.

Reported as "Snippet 6" in https://www.viva64.com/en/b/0771/
This commit is contained in:
Simon Pilgrim 2020-10-27 13:14:40 +00:00
parent 2bc2e2e9fe
commit b19473cf59
1 changed files with 2 additions and 3 deletions

View File

@ -5285,9 +5285,8 @@ void RewriteObjCFragileABI::RewriteObjCClassMetaData(ObjCImplementationDecl *IDe
}
// Build _objc_ivar_list metadata for classes ivars if needed
unsigned NumIvars = !IDecl->ivar_empty()
? IDecl->ivar_size()
: (CDecl ? CDecl->ivar_size() : 0);
unsigned NumIvars =
!IDecl->ivar_empty() ? IDecl->ivar_size() : CDecl->ivar_size();
if (NumIvars > 0) {
static bool objc_ivar = false;
if (!objc_ivar) {