Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.

Timings showed no significant difference before and after the commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index 7210d2c..368345d 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -517,7 +517,7 @@
           
           // Scan the method for ivar references.  While this requires an
           // entire AST scan, the cost should not be high in practice.
-          St = scanForIvars(MD->getBody(getContext()), PD, St);
+          St = scanForIvars(MD->getBody(), PD, St);
         }
       }
     }
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index 38ea458..3db96ca 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -146,7 +146,7 @@
   
   ParentMap& getParentMap() {
     if (PM.get() == 0)
-      PM.reset(new ParentMap(getCodeDecl().getBody(getASTContext())));
+      PM.reset(new ParentMap(getCodeDecl().getBody()));
     return *PM.get();
   }
   
@@ -182,8 +182,7 @@
   if (Stmt *S = GetNextStmt(N))
     return PathDiagnosticLocation(S, getSourceManager());
 
-  return FullSourceLoc(getCodeDecl().getBodyRBrace(getASTContext()),
-                       getSourceManager());
+  return FullSourceLoc(getCodeDecl().getBodyRBrace(), getSourceManager());
 }
   
 PathDiagnosticLocation
@@ -893,7 +892,7 @@
     // statement (if it doesn't already exist).
     // FIXME: Should handle CXXTryStmt if analyser starts supporting C++.
     if (const CompoundStmt *CS =
-          PDB.getCodeDecl().getCompoundBody(PDB.getASTContext()))
+          PDB.getCodeDecl().getCompoundBody())
       if (!CS->body_empty()) {
         SourceLocation Loc = (*CS->body_begin())->getLocStart();
         rawAddEdge(PathDiagnosticLocation(Loc, PDB.getSourceManager()));
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index b25fdb3..619dbe5 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -2632,7 +2632,7 @@
   
   if (!L.isValid()) {
     const Decl &D = BRC.getCodeDecl();
-    L = PathDiagnosticLocation(D.getBodyRBrace(BRC.getASTContext()), SMgr);
+    L = PathDiagnosticLocation(D.getBodyRBrace(), SMgr);
   }
   
   std::string sbuf;
diff --git a/lib/Analysis/CheckObjCDealloc.cpp b/lib/Analysis/CheckObjCDealloc.cpp
index f50d7a1..e5f0485 100644
--- a/lib/Analysis/CheckObjCDealloc.cpp
+++ b/lib/Analysis/CheckObjCDealloc.cpp
@@ -172,7 +172,7 @@
   }
   
   // dealloc found.  Scan for missing [super dealloc].
-  if (MD->getBody(Ctx) && !scan_dealloc(MD->getBody(Ctx), S)) {
+  if (MD->getBody() && !scan_dealloc(MD->getBody(), S)) {
     
     const char* name = LOpts.getGCMode() == LangOptions::NonGC
                        ? "missing [super dealloc]"
@@ -223,7 +223,7 @@
               
     // ivar must be released if and only if the kind of setter was not 'assign'
     bool requiresRelease = PD->getSetterKind() != ObjCPropertyDecl::Assign;
-    if(scan_ivar_release(MD->getBody(Ctx), ID, PD, RS, SelfII, Ctx) 
+    if(scan_ivar_release(MD->getBody(), ID, PD, RS, SelfII, Ctx) 
        != requiresRelease) {
       const char *name;
       const char* category = "Memory (Core Foundation/Objective-C)";
diff --git a/lib/Analysis/CheckObjCUnusedIVars.cpp b/lib/Analysis/CheckObjCUnusedIVars.cpp
index a68c82f..bbcf90e 100644
--- a/lib/Analysis/CheckObjCUnusedIVars.cpp
+++ b/lib/Analysis/CheckObjCUnusedIVars.cpp
@@ -85,7 +85,7 @@
   // Now scan the methods for accesses.
   for (ObjCImplementationDecl::instmeth_iterator I = D->instmeth_begin(Ctx),
        E = D->instmeth_end(Ctx); I!=E; ++I)
-    Scan(M, (*I)->getBody(Ctx));
+    Scan(M, (*I)->getBody());
   
   // Scan for @synthesized property methods that act as setters/getters
   // to an ivar.