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/Frontend/AnalysisConsumer.cpp b/lib/Frontend/AnalysisConsumer.cpp
index 2363ead..3bdd0ca 100644
--- a/lib/Frontend/AnalysisConsumer.cpp
+++ b/lib/Frontend/AnalysisConsumer.cpp
@@ -307,7 +307,7 @@
           Opts.AnalyzeSpecificFunction != FD->getIdentifier()->getName())
         break;
       
-      Stmt* Body = FD->getBody(*Ctx);
+      Stmt* Body = FD->getBody();
       if (Body) HandleCode(FD, Body, FunctionActions);
       break;
     }
diff --git a/lib/Frontend/DeclXML.cpp b/lib/Frontend/DeclXML.cpp
index 5c21999..dcc9cea 100644
--- a/lib/Frontend/DeclXML.cpp
+++ b/lib/Frontend/DeclXML.cpp
@@ -147,7 +147,7 @@
   DeclPrinter(*this).Visit(D);
   if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) 
   {
-    if (Stmt *Body = FD->getBody(*Ctx)) {
+    if (Stmt *Body = FD->getBody()) {
       addSubNode("Body");
       PrintStmt(Body);
       toParent();
diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp
index 97a3a78..a6843e1 100644
--- a/lib/Frontend/PCHWriterDecl.cpp
+++ b/lib/Frontend/PCHWriterDecl.cpp
@@ -146,7 +146,7 @@
   VisitValueDecl(D);
   Record.push_back(D->isThisDeclarationADefinition());
   if (D->isThisDeclarationADefinition())
-    Writer.AddStmt(D->getBody(Context));
+    Writer.AddStmt(D->getBody());
   Writer.AddDeclRef(D->getPreviousDeclaration(), Record);
   Record.push_back(D->getStorageClass()); // FIXME: stable encoding
   Record.push_back(D->isInline());
@@ -172,7 +172,7 @@
   // Unlike C/C++, method bodies will never be in header files. 
   Record.push_back(D->getBody() != 0);
   if (D->getBody() != 0) {
-    Writer.AddStmt(D->getBody(Context));
+    Writer.AddStmt(D->getBody());
     Writer.AddDeclRef(D->getSelfDecl(), Record);
     Writer.AddDeclRef(D->getCmdDecl(), Record);
   }
diff --git a/lib/Frontend/ResolveLocation.cpp b/lib/Frontend/ResolveLocation.cpp
index 4bbb94d..3908e89 100644
--- a/lib/Frontend/ResolveLocation.cpp
+++ b/lib/Frontend/ResolveLocation.cpp
@@ -211,7 +211,7 @@
   // Finally, search through the body of the function.
   if (D->isThisDeclarationADefinition()) {
     StmtLocResolver SLR(Ctx, Loc);
-    SLR.Visit(D->getBody(Ctx));
+    SLR.Visit(D->getBody());
     if (SLR.FoundIt()) {
       llvm::tie(Dcl, Stm) = SLR.getResult();
       // If we didn't find a more immediate 'parent' declaration for the
diff --git a/lib/Frontend/RewriteBlocks.cpp b/lib/Frontend/RewriteBlocks.cpp
index 2848532..29590de 100644
--- a/lib/Frontend/RewriteBlocks.cpp
+++ b/lib/Frontend/RewriteBlocks.cpp
@@ -1089,7 +1089,7 @@
     RewriteFunctionProtoType(FD->getType(), FD);
 
     // FIXME: Handle CXXTryStmt
-    if (CompoundStmt *Body = FD->getCompoundBody(*Context)) {
+    if (CompoundStmt *Body = FD->getCompoundBody()) {
       CurFunctionDef = FD;
       FD->setBody(cast_or_null<CompoundStmt>(RewriteFunctionBody(Body)));
       // This synthesizes and inserts the block "impl" struct, invoke function,
@@ -1101,7 +1101,7 @@
   }
   if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
     RewriteMethodDecl(MD);
-    if (Stmt *Body = MD->getBody(*Context)) {
+    if (Stmt *Body = MD->getBody()) {
       CurMethodDef = MD;
       RewriteFunctionBody(Body);
       InsertBlockLiteralsWithinMethod(MD);
@@ -1113,7 +1113,7 @@
       RewriteBlockPointerDecl(VD);
       if (VD->getInit()) {
         if (BlockExpr *CBE = dyn_cast<BlockExpr>(VD->getInit())) {
-          RewriteFunctionBody(CBE->getBody(*Context));
+          RewriteFunctionBody(CBE->getBody());
 
           // We've just rewritten the block body in place.
           // Now we snarf the rewritten text and stash it away for later use.
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index 6c1c102..a48e8e6 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -993,7 +993,7 @@
     ObjCMethodDecl *OMD = *I;
     RewriteObjCMethodDecl(OMD, ResultStr);
     SourceLocation LocStart = OMD->getLocStart();
-    SourceLocation LocEnd = OMD->getCompoundBody(*Context)->getLocStart();
+    SourceLocation LocEnd = OMD->getCompoundBody()->getLocStart();
 
     const char *startBuf = SM->getCharacterData(LocStart);
     const char *endBuf = SM->getCharacterData(LocEnd);
@@ -1009,7 +1009,7 @@
     ObjCMethodDecl *OMD = *I;
     RewriteObjCMethodDecl(OMD, ResultStr);
     SourceLocation LocStart = OMD->getLocStart();
-    SourceLocation LocEnd = OMD->getCompoundBody(*Context)->getLocStart();
+    SourceLocation LocEnd = OMD->getCompoundBody()->getLocStart();
     
     const char *startBuf = SM->getCharacterData(LocStart);
     const char *endBuf = SM->getCharacterData(LocEnd);
@@ -4554,7 +4554,7 @@
     RewriteBlocksInFunctionProtoType(FD->getType(), FD);
 
     // FIXME: If this should support Obj-C++, support CXXTryStmt
-    if (CompoundStmt *Body = FD->getCompoundBody(*Context)) {
+    if (CompoundStmt *Body = FD->getCompoundBody()) {
       CurFunctionDef = FD;
       CollectPropertySetters(Body);
       CurrentBody = Body;
@@ -4574,7 +4574,7 @@
     return;
   }
   if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
-    if (CompoundStmt *Body = MD->getBody()) {
+    if (CompoundStmt *Body = MD->getCompoundBody()) {
       CurMethodDef = MD;
       CollectPropertySetters(Body);
       CurrentBody = Body;