Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed
out.  The remaining ones are okay.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103973 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp
index a3b62d2..d35546b 100644
--- a/lib/CodeGen/CGObjCGNU.cpp
+++ b/lib/CodeGen/CGObjCGNU.cpp
@@ -1939,11 +1939,11 @@
         const ObjCObjectPointerType *OPT =
           CatchDecl->getType()->getAs<ObjCObjectPointerType>();
         assert(OPT && "Invalid @catch type.");
-        const ObjCInterfaceType *IT =
-          OPT->getPointeeType()->getAs<ObjCInterfaceType>();
-        assert(IT && "Invalid @catch type.");
+        const ObjCInterfaceDecl *IDecl =
+          OPT->getObjectType()->getInterface();
+        assert(IDecl && "Invalid @catch type.");
         llvm::Value *EHType =
-          MakeConstantString(IT->getDecl()->getNameAsString());
+          MakeConstantString(IDecl->getNameAsString());
         ESelArgs.push_back(EHType);
       }
     }