[cfe-commits] r70388 - /cfe/trunk/lib/Analysis/CFRefCount.cpp

Ted Kremenek kremenek at apple.com
Wed Apr 29 10:17:48 PDT 2009


Author: kremenek
Date: Wed Apr 29 12:17:48 2009
New Revision: 70388

URL: http://llvm.org/viewvc/llvm-project?rev=70388&view=rev
Log:
Add version of getMethodSummary() that can be used to query the summary for the
method currently being analyzed.

Modified:
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=70388&r1=70387&r2=70388&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Wed Apr 29 12:17:48 2009
@@ -748,6 +748,20 @@
                                  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);





More information about the cfe-commits mailing list