aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-05-17 21:00:27 +0000
committerJohn McCall <rjmccall@apple.com>2010-05-17 21:00:27 +0000
commit506b57e8b79d7dc2c367bf2ee7ec95420ad3fc8f (patch)
tree8d70cbc51dbea759e13389d30bc6cfc6bfe29923 /lib/CodeGen/CGObjCMac.cpp
parentdcf22ad88fdb6c4dd74f9065262cde8bac4f807b (diff)
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
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 279ca72182..4609d30f0e 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -2701,12 +2701,12 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
}
assert(OPT && "Unexpected non-object pointer type in @catch");
- QualType T = OPT->getPointeeType();
- const ObjCInterfaceType *ObjCType = T->getAs<ObjCInterfaceType>();
- assert(ObjCType && "Catch parameter must have Objective-C type!");
+ const ObjCObjectType *ObjTy = OPT->getObjectType();
+ ObjCInterfaceDecl *IDecl = ObjTy->getInterface();
+ assert(IDecl && "Catch parameter must have Objective-C type!");
// Check if the @catch block matches the exception object.
- llvm::Value *Class = EmitClassRef(CGF.Builder, ObjCType->getDecl());
+ llvm::Value *Class = EmitClassRef(CGF.Builder, IDecl);
llvm::Value *Match =
CGF.Builder.CreateCall2(ObjCTypes.getExceptionMatchFn(),
@@ -5096,12 +5096,12 @@ CGObjCNonFragileABIMac::GetMethodDescriptionConstant(const ObjCMethodDecl *MD) {
/// @encode
///
LValue CGObjCNonFragileABIMac::EmitObjCValueForIvar(
- CodeGen::CodeGenFunction &CGF,
- QualType ObjectTy,
- llvm::Value *BaseValue,
- const ObjCIvarDecl *Ivar,
- unsigned CVRQualifiers) {
- const ObjCInterfaceDecl *ID = ObjectTy->getAs<ObjCInterfaceType>()->getDecl();
+ CodeGen::CodeGenFunction &CGF,
+ QualType ObjectTy,
+ llvm::Value *BaseValue,
+ const ObjCIvarDecl *Ivar,
+ unsigned CVRQualifiers) {
+ ObjCInterfaceDecl *ID = ObjectTy->getAs<ObjCObjectType>()->getInterface();
return EmitValueForIvarAtOffset(CGF, ID, BaseValue, Ivar, CVRQualifiers,
EmitIvarOffset(CGF, ID, Ivar));
}