summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-29 17:17:48 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-29 17:17:48 +0000
commit99fe1695c7146fe968acaba68261d3e2383103cd (patch)
tree2f66603aa3029f1c6c1bfca62850dfac22d88324 /clang
parent387243067ae903b8581755f5d2d351b11013d37b (diff)
downloadbcm5719-llvm-99fe1695c7146fe968acaba68261d3e2383103cd.tar.gz
bcm5719-llvm-99fe1695c7146fe968acaba68261d3e2383103cd.zip
Add version of getMethodSummary() that can be used to query the summary for the
method currently being analyzed. llvm-svn: 70388
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 721d80095a8..149fe234653 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud