Hi Fariborz, It would be really nice to tweak the Objective-C test cases in llvm-test to check for this as well, since it is a fairly subtle point.
- Daniel On Mon, Jul 27, 2009 at 4:12 PM, Fariborz Jahanian<[email protected]> wrote: > Author: fjahanian > Date: Mon Jul 27 18:12:41 2009 > New Revision: 77270 > > URL: http://llvm.org/viewvc/llvm-project?rev=77270&view=rev > Log: > Patch for objc's zero-const exception to not assume > that @catch(...) cathces all exceptions (c++ objects > are not cought by that). > > > Modified: > cfe/trunk/lib/CodeGen/CGObjCMac.cpp > > Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=77270&r1=77269&r2=77270&view=diff > > ============================================================================== > --- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original) > +++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Mon Jul 27 18:12:41 2009 > @@ -5464,18 +5464,17 @@ > 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); > + } > } > } > } > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
