Support objc_nonlazy_class attribute on Objective-C implementations
Fixes rdar://49523079
Differential revision: https://reviews.llvm.org/D60544
llvm-svn: 358201
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 7d760bd..ad141d6 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -6262,7 +6262,8 @@
bool CGObjCNonFragileABIMac::ImplementationIsNonLazy(
const ObjCImplDecl *OD) const {
return OD->getClassMethod(GetNullarySelector("load")) != nullptr ||
- OD->getClassInterface()->hasAttr<ObjCNonLazyClassAttr>();
+ OD->getClassInterface()->hasAttr<ObjCNonLazyClassAttr>() ||
+ OD->hasAttr<ObjCNonLazyClassAttr>();
}
void CGObjCNonFragileABIMac::GetClassSizeInfo(const ObjCImplementationDecl *OID,