From 3f6cd0bc76b29da9a98ce84149d254edfd50b56b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 26 Jul 2008 22:36:27 +0000 Subject: [PATCH] remove some unneeded calls to getCanonicalType llvm-svn: 54106 --- clang/Driver/RewriteObjC.cpp | 5 ++--- clang/lib/Analysis/CFRefCount.cpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/clang/Driver/RewriteObjC.cpp b/clang/Driver/RewriteObjC.cpp index 641da1877d35..56f3b3d0f44e 100644 --- a/clang/Driver/RewriteObjC.cpp +++ b/clang/Driver/RewriteObjC.cpp @@ -1992,10 +1992,9 @@ Stmt *RewriteObjC::SynthMessageExpr(ObjCMessageExpr *Exp) { FunctionDecl *MsgSendStretFlavor = 0; if (ObjCMethodDecl *mDecl = Exp->getMethodDecl()) { QualType resultType = mDecl->getResultType(); - if (resultType.getCanonicalType()->isStructureType() - || resultType.getCanonicalType()->isUnionType()) + if (resultType->isStructureType() || resultType->isUnionType()) MsgSendStretFlavor = MsgSendStretFunctionDecl; - else if (resultType.getCanonicalType()->isRealFloatingType()) + else if (resultType->isRealFloatingType()) MsgSendFlavor = MsgSendFpretFunctionDecl; } diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 17ad4481d301..319318f99075 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -1462,8 +1462,7 @@ static QualType GetReturnType(Expr* RetE, ASTContext& Ctx) { QualType RetTy = RetE->getType(); // FIXME: We aren't handling id<...>. - const PointerType* PT = RetTy.getCanonicalType()->getAsPointerType(); - + const PointerType* PT = RetTy->getAsPointerType(); if (!PT) return RetTy;