From 99fe1695c7146fe968acaba68261d3e2383103cd Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 29 Apr 2009 17:17:48 +0000 Subject: Add version of getMethodSummary() that can be used to query the summary for the method currently being analyzed. llvm-svn: 70388 --- clang/lib/Analysis/CFRefCount.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'clang/lib/Analysis/CFRefCount.cpp') 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); -- cgit v1.2.3