diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-22 08:08:35 +0000 |
commit | b897c8660c4ff7037dde81b9645737bc1c992abe (patch) | |
tree | b6403365e77095a79062d3379c9e6aea0df5f088 /lib/CodeGen/CGObjCMac.cpp | |
parent | 7ef7bab7e3d06f660b059b903c231f100bb13cc5 (diff) |
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index bd5b05acf94a..6ffca8134afa 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -1356,11 +1356,12 @@ static llvm::Constant *getConstantGEP(llvm::Constant *C, /// hasObjCExceptionAttribute - Return true if this class or any super /// class has the __objc_exception__ attribute. -static bool hasObjCExceptionAttribute(const ObjCInterfaceDecl *OID) { - if (OID->hasAttr<ObjCExceptionAttr>()) +static bool hasObjCExceptionAttribute(ASTContext &Context, + const ObjCInterfaceDecl *OID) { + if (OID->hasAttr<ObjCExceptionAttr>(Context)) return true; if (const ObjCInterfaceDecl *Super = OID->getSuperClass()) - return hasObjCExceptionAttribute(Super); + return hasObjCExceptionAttribute(Context, Super); return false; } @@ -4402,7 +4403,7 @@ void CGObjCNonFragileABIMac::GenerateClass(const ObjCImplementationDecl *ID) { if (classIsHidden) flags |= OBJC2_CLS_HIDDEN; - if (hasObjCExceptionAttribute(ID->getClassInterface())) + if (hasObjCExceptionAttribute(CGM.getContext(), ID->getClassInterface())) flags |= CLS_EXCEPTION; if (!ID->getClassInterface()->getSuperClass()) { @@ -5686,7 +5687,7 @@ CGObjCNonFragileABIMac::GetInterfaceEHType(const ObjCInterfaceDecl *ID, // If this type (or a super class) has the __objc_exception__ // attribute, emit an external reference. - if (hasObjCExceptionAttribute(ID)) + if (hasObjCExceptionAttribute(CGM.getContext(), ID)) return Entry = new llvm::GlobalVariable(ObjCTypes.EHTypeTy, false, llvm::GlobalValue::ExternalLinkage, |