FunctionDecl::getBody() is getting an ASTContext argument for use in
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/RewriteBlocks.cpp b/tools/clang-cc/RewriteBlocks.cpp
index f1f53e4..a9324e6 100644
--- a/tools/clang-cc/RewriteBlocks.cpp
+++ b/tools/clang-cc/RewriteBlocks.cpp
@@ -1092,7 +1092,7 @@
// definitions using the same code.
RewriteFunctionProtoType(FD->getType(), FD);
- if (CompoundStmt *Body = FD->getBody()) {
+ if (CompoundStmt *Body = FD->getBody(*Context)) {
CurFunctionDef = FD;
FD->setBody(cast_or_null<CompoundStmt>(RewriteFunctionBody(Body)));
// This synthesizes and inserts the block "impl" struct, invoke function,
@@ -1104,7 +1104,7 @@
}
if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
RewriteMethodDecl(MD);
- if (Stmt *Body = MD->getBody()) {
+ if (Stmt *Body = MD->getBody(*Context)) {
CurMethodDef = MD;
RewriteFunctionBody(Body);
InsertBlockLiteralsWithinMethod(MD);
@@ -1116,7 +1116,7 @@
RewriteBlockPointerDecl(VD);
if (VD->getInit()) {
if (BlockExpr *CBE = dyn_cast<BlockExpr>(VD->getInit())) {
- RewriteFunctionBody(CBE->getBody());
+ RewriteFunctionBody(CBE->getBody(*Context));
// We've just rewritten the block body in place.
// Now we snarf the rewritten text and stash it away for later use.