remove some unneeded calls to getCanonicalType

llvm-svn: 54106
This commit is contained in:
Chris Lattner
2008-07-26 22:36:27 +00:00
parent 574dee6cac
commit 3f6cd0bc76
2 changed files with 3 additions and 5 deletions

View 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;
}

View 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;