[cfe-commits] r54106 - in /cfe/trunk: Driver/RewriteObjC.cpp lib/Analysis/CFRefCount.cpp

Chris Lattner sabre at nondot.org
Sat Jul 26 15:36:28 PDT 2008


Author: lattner
Date: Sat Jul 26 17:36:27 2008
New Revision: 54106

URL: http://llvm.org/viewvc/llvm-project?rev=54106&view=rev
Log:
remove some unneeded calls to getCanonicalType

Modified:
    cfe/trunk/Driver/RewriteObjC.cpp
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/Driver/RewriteObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/RewriteObjC.cpp?rev=54106&r1=54105&r2=54106&view=diff

==============================================================================
--- cfe/trunk/Driver/RewriteObjC.cpp (original)
+++ cfe/trunk/Driver/RewriteObjC.cpp Sat Jul 26 17:36:27 2008
@@ -1992,10 +1992,9 @@
   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;
   }
   

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=54106&r1=54105&r2=54106&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Sat Jul 26 17:36:27 2008
@@ -1462,8 +1462,7 @@
   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;
     





More information about the cfe-commits mailing list