diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-27 23:12:41 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-27 23:12:41 +0000 |
commit | 99438a726ed16bf1847a18a6abc114304be9a6ce (patch) | |
tree | 1ac8c169d7695479cc75692a2967e3d338d58164 /lib/CodeGen | |
parent | 08e252425ca2cbdc44ba65d9a657ed5398014e36 (diff) |
Patch for objc's zero-const exception to not assume
that @catch(...) cathces all exceptions (c++ objects
are not cought by that).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 080f979ce9..f02e513bdf 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -5464,18 +5464,17 @@ CGObjCNonFragileABIMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF, llvm::GlobalValue::ExternalLinkage, 0, "OBJC_EHTYPE_id"); SelectorArgs.push_back(IDEHType); - HasCatchAll = true; - break; } - - // All other types should be Objective-C interface pointer types. - const ObjCObjectPointerType *PT = - CatchDecl->getType()->getAsObjCObjectPointerType(); - assert(PT && "Invalid @catch type."); - const ObjCInterfaceType *IT = PT->getInterfaceType(); - assert(IT && "Invalid @catch type."); - llvm::Value *EHType = GetInterfaceEHType(IT->getDecl(), false); - SelectorArgs.push_back(EHType); + else { + // All other types should be Objective-C interface pointer types. + const ObjCObjectPointerType *PT = + CatchDecl->getType()->getAsObjCObjectPointerType(); + assert(PT && "Invalid @catch type."); + const ObjCInterfaceType *IT = PT->getInterfaceType(); + assert(IT && "Invalid @catch type."); + llvm::Value *EHType = GetInterfaceEHType(IT->getDecl(), false); + SelectorArgs.push_back(EHType); + } } } } |