]> granicus.if.org Git - clang/commitdiff
remove some unneeded calls to getCanonicalType
authorChris Lattner <sabre@nondot.org>
Sat, 26 Jul 2008 22:36:27 +0000 (22:36 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 26 Jul 2008 22:36:27 +0000 (22:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54106 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteObjC.cpp
lib/Analysis/CFRefCount.cpp

index 641da1877d3595aa5da92f94d6e8afee634e976b..56f3b3d0f44ee4e4cadad7184d94e783cabc9ebd 100644 (file)
@@ -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;
   }
   
index 17ad4481d301a0d5ad6218a0ff65191ade18fabc..319318f99075e61b50af0402fad3897c518fbe62 100644 (file)
@@ -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;