]> granicus.if.org Git - clang/commitdiff
Add version of getMethodSummary() that can be used to query the summary for the
authorTed Kremenek <kremenek@apple.com>
Wed, 29 Apr 2009 17:17:48 +0000 (17:17 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 29 Apr 2009 17:17:48 +0000 (17:17 +0000)
method currently being analyzed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70388 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index 721d80095a8a754f0fa9a31202a57c43372dbeb5..149fe2346533c5abd375204d1c8e4e94728f6cc8 100644 (file)
@@ -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);