aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/RewriteBlocks.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-30 02:35:26 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-06-30 02:35:26 +0000
commit6fb0aee4f9dc261bbec72e1283ad8dc0557a6d96 (patch)
tree8a5df51bc33e8901405a9c426aee3eddf47ab881 /lib/Frontend/RewriteBlocks.cpp
parentf1d60eaf3f70975ee262852af2d6aeabd140ed58 (diff)
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
Diffstat (limited to 'lib/Frontend/RewriteBlocks.cpp')
-rw-r--r--lib/Frontend/RewriteBlocks.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Frontend/RewriteBlocks.cpp b/lib/Frontend/RewriteBlocks.cpp
index 2848532600..29590de851 100644
--- a/lib/Frontend/RewriteBlocks.cpp
+++ b/lib/Frontend/RewriteBlocks.cpp
@@ -1089,7 +1089,7 @@ void RewriteBlocks::HandleDeclInMainFile(Decl *D) {
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 @@ void RewriteBlocks::HandleDeclInMainFile(Decl *D) {
}
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 @@ void RewriteBlocks::HandleDeclInMainFile(Decl *D) {
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.