[cfe-commits] r77270 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp

Fariborz Jahanian fjahanian at apple.com
Mon Jul 27 16:12:41 PDT 2009


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);
+        }
       }
     }
   }





More information about the cfe-commits mailing list