diff options
| author | John McCall <rjmccall@apple.com> | 2010-05-17 21:00:27 +0000 | 
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-05-17 21:00:27 +0000 | 
| commit | 96fa4845f7c0be1ca0dae2eae34d6dfcb1452a79 (patch) | |
| tree | 58bffab5f3e4f4c6b3a3b72da63237522348dc39 /clang/lib/Frontend | |
| parent | 0450cc684c6699a184b451116aa0efe850a11d4e (diff) | |
| download | bcm5719-llvm-96fa4845f7c0be1ca0dae2eae34d6dfcb1452a79.tar.gz bcm5719-llvm-96fa4845f7c0be1ca0dae2eae34d6dfcb1452a79.zip | |
Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed
out.  The remaining ones are okay.
llvm-svn: 103973
Diffstat (limited to 'clang/lib/Frontend')
| -rw-r--r-- | clang/lib/Frontend/RewriteObjC.cpp | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/clang/lib/Frontend/RewriteObjC.cpp b/clang/lib/Frontend/RewriteObjC.cpp index 3c415c79d95..892fc73bfcd 100644 --- a/clang/lib/Frontend/RewriteObjC.cpp +++ b/clang/lib/Frontend/RewriteObjC.cpp @@ -1911,13 +1911,13 @@ Stmt *RewriteObjC::RewriteObjCTryStmt(ObjCAtTryStmt *S) {          buf += "1) { ";          ReplaceText(startLoc, lParenLoc-startBuf+1, buf);          sawIdTypedCatch = true; -      } else if (t->isObjCObjectPointerType()) { -        QualType InterfaceTy = t->getPointeeType(); -        const ObjCInterfaceType *cls = // Should be a pointer to a class. -          InterfaceTy->getAs<ObjCInterfaceType>(); -        if (cls) { +      } else if (const ObjCObjectPointerType *Ptr = +                   t->getAs<ObjCObjectPointerType>()) { +        // Should be a pointer to a class. +        ObjCInterfaceDecl *IDecl = Ptr->getObjectType()->getInterface(); +        if (IDecl) {            buf += "objc_exception_match((struct objc_class *)objc_getClass(\""; -          buf += cls->getDecl()->getNameAsString(); +          buf += IDecl->getNameAsString();            buf += "\"), (struct objc_object *)_caught)) { ";            ReplaceText(startLoc, lParenLoc-startBuf+1, buf);          } @@ -2811,7 +2811,7 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp,      llvm::SmallVector<Expr*, 8> ClsExprs;      QualType argType = Context->getPointerType(Context->CharTy);      ObjCInterfaceDecl *Class -      = Exp->getClassReceiver()->getAs<ObjCInterfaceType>()->getDecl(); +      = Exp->getClassReceiver()->getAs<ObjCObjectType>()->getInterface();      IdentifierInfo *clsName = Class->getIdentifier();      ClsExprs.push_back(StringLiteral::Create(*Context,                                               clsName->getNameStart(), | 

