diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-29 17:17:48 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-29 17:17:48 +0000 |
commit | 552333cfa9c91d3be656699dacf7c5e98e875ee8 (patch) | |
tree | 3bb8e706ce70fdb5e50f3d20953ed50f2caa9683 /lib/Analysis/CFRefCount.cpp | |
parent | ce8a41d020d0b171535d77f73adb8acb3e6a881e (diff) |
Add version of getMethodSummary() that can be used to query the summary for the
method currently being analyzed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70388 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 721d80095a..149fe23465 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -748,6 +748,20 @@ public: ME->getClassInfo().first, ME->getMethodDecl(), ME->getType()); } + + /// getMethodSummary - This version of getMethodSummary is used to query + /// the summary for the current method being analyzed. + RetainSummary *getMethodSummary(ObjCMethodDecl *MD) { + Selector S = MD->getSelector(); + ObjCInterfaceDecl *ID = MD->getClassInterface(); + IdentifierInfo *ClsName = ID->getIdentifier(); + QualType ResultTy = MD->getResultType(); + + if (MD->isInstanceMethod()) + return getInstanceMethodSummary(S, ClsName, ID, MD, ResultTy); + else + return getClassMethodSummary(S, ClsName, ID, MD, ResultTy); + } RetainSummary* getCommonMethodSummary(ObjCMethodDecl* MD, Selector S, QualType RetTy); |