aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-09-21 23:43:11 +0000
committerJohn McCall <rjmccall@apple.com>2009-09-21 23:43:11 +0000
commit183700f494ec9b6701b6efe82bcb25f4c79ba561 (patch)
tree797f214407f66937802226652d130f95d596e33b /lib/Analysis/CFRefCount.cpp
parentc32b24452ebb537934b20b7133a3a0cbce447666 (diff)
Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 86edfb946c..81ebccb76a 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -553,7 +553,7 @@ public:
const ObjCInterfaceDecl* getReceiverDecl(Expr* E) {
if (const ObjCObjectPointerType* PT =
- E->getType()->getAsObjCObjectPointerType())
+ E->getType()->getAs<ObjCObjectPointerType>())
return PT->getInterfaceDecl();
return NULL;
@@ -886,7 +886,7 @@ bool RetainSummaryManager::isTrackedObjCObjectType(QualType Ty) {
if (!Ty->isObjCObjectPointerType())
return false;
- const ObjCObjectPointerType *PT = Ty->getAsObjCObjectPointerType();
+ const ObjCObjectPointerType *PT = Ty->getAs<ObjCObjectPointerType>();
// Can be true for objects with the 'NSObject' attribute.
if (!PT)
@@ -953,9 +953,9 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
break;
}
- // [PR 3337] Use 'getAsFunctionType' to strip away any typedefs on the
+ // [PR 3337] Use 'getAs<FunctionType>' to strip away any typedefs on the
// function's type.
- const FunctionType* FT = FD->getType()->getAsFunctionType();
+ const FunctionType* FT = FD->getType()->getAs<FunctionType>();
const char* FName = FD->getIdentifier()->getName();
// Strip away preceding '_'. Doing this here will effect all the checks
@@ -2739,7 +2739,7 @@ static QualType GetReturnType(const Expr* RetE, ASTContext& Ctx) {
// If RetE is a message expression, return its types if it is something
/// more specific than id.
if (const ObjCMessageExpr *ME = dyn_cast<ObjCMessageExpr>(RetE))
- if (const ObjCObjectPointerType *PT = RetTy->getAsObjCObjectPointerType())
+ if (const ObjCObjectPointerType *PT = RetTy->getAs<ObjCObjectPointerType>())
if (PT->isObjCQualifiedIdType() || PT->isObjCIdType() ||
PT->isObjCClassType()) {
// At this point we know the return type of the message expression is
@@ -3012,7 +3012,7 @@ void CFRefCount::EvalObjCMessageExpr(ExplodedNodeSet& Dst,
if (Sym) {
if (const RefVal* T = St->get<RefBindings>(Sym)) {
if (const ObjCObjectPointerType* PT =
- T->getType()->getAsObjCObjectPointerType())
+ T->getType()->getAs<ObjCObjectPointerType>())
ID = PT->getInterfaceDecl();
}
}
@@ -3021,7 +3021,7 @@ void CFRefCount::EvalObjCMessageExpr(ExplodedNodeSet& Dst,
// that is called.
if (!ID) {
if (const ObjCObjectPointerType *PT =
- Receiver->getType()->getAsObjCObjectPointerType())
+ Receiver->getType()->getAs<ObjCObjectPointerType>())
ID = PT->getInterfaceDecl();
}