From e309b48a2265d7ab9b6801e2917e823e58f71e89 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 27 Jul 2009 23:12:41 +0000 Subject: [PATCH] Patch for objc's zero-const exception to not assume that @catch(...) cathces all exceptions (c++ objects are not cought by that). llvm-svn: 77270 --- clang/lib/CodeGen/CGObjCMac.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp index 080f979ce977..f02e513bdf0a 100644 --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/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); + } } } }