Remove BlockStmtExpr.
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56288 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/RewriteBlocks.cpp b/Driver/RewriteBlocks.cpp
index 34bf785..753f4ff 100644
--- a/Driver/RewriteBlocks.cpp
+++ b/Driver/RewriteBlocks.cpp
@@ -94,7 +94,7 @@
void InsertBlockLiteralsWithinMethod(ObjCMethodDecl *MD);
// Block specific rewrite rules.
- void RewriteBlockStmtExpr(BlockStmtExpr *Exp);
+ void RewriteBlockExpr(BlockExpr *Exp);
void RewriteBlockCall(CallExpr *Exp);
void RewriteBlockPointerDecl(NamedDecl *VD);
@@ -349,7 +349,7 @@
// first add the implicit argument.
S += Tag + " *__cself, ";
std::string ParamStr;
- for (BlockStmtExpr::arg_iterator AI = CE->arg_begin(),
+ for (BlockExpr::arg_iterator AI = CE->arg_begin(),
E = CE->arg_end(); AI != E; ++AI) {
if (AI != CE->arg_begin()) S += ", ";
ParamStr = (*AI)->getName();
@@ -398,7 +398,7 @@
(*I)->getType().getAsStringInternal(Name);
S += Name + " = __cself->" + (*I)->getName() + "; // bound by copy\n";
}
- if (BlockStmtExpr *CBE = dyn_cast<BlockStmtExpr>(CE)) {
+ if (BlockExpr *CBE = dyn_cast<BlockExpr>(CE)) {
std::string BodyBuf;
SourceLocation BodyLocStart = CBE->getBody()->getLocStart();
@@ -635,10 +635,10 @@
for (Stmt::child_iterator CI = S->child_begin(), E = S->child_end();
CI != E; ++CI)
if (*CI) {
- if (BlockStmtExpr *CBE = dyn_cast<BlockStmtExpr>(*CI)) {
+ if (BlockExpr *CBE = dyn_cast<BlockExpr>(*CI)) {
// We intentionally avoid rewritting the contents of a closure block
// expr. InsertBlockLiteralsWithinFunction() will rewrite the body.
- RewriteBlockStmtExpr(CBE);
+ RewriteBlockExpr(CBE);
} else {
Stmt *newStmt = RewriteFunctionBody(*CI);
if (newStmt)
@@ -831,7 +831,7 @@
return;
}
-void RewriteBlocks::RewriteBlockStmtExpr(BlockStmtExpr *Exp) {
+void RewriteBlocks::RewriteBlockExpr(BlockExpr *Exp) {
Blocks.push_back(Exp);
bool haveByRefDecls = false;