diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
commit | 78bd61f6613196207adcfe48d59b2410882df1b8 (patch) | |
tree | e2524bdcd97b54a68d08ced81985b50537ad400f /clang/lib/CodeGen/CGObjCMac.cpp | |
parent | 0fd4eaef3038694dc25b3c13ad21d8ed5b196f50 (diff) | |
download | bcm5719-llvm-78bd61f6613196207adcfe48d59b2410882df1b8.tar.gz bcm5719-llvm-78bd61f6613196207adcfe48d59b2410882df1b8.zip |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
llvm-svn: 73702
Diffstat (limited to 'clang/lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjCMac.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index bd5b05acf94..6ffca8134af 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/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, |