Rename FuncDecl::getBody() to FuncDecl::getFuncExpr()

ConstructorDecl::getBody() and DestructorDecl::getBody() return 'BraceStmt *'.
After changing the AST representation for functions, FuncDecl::getBody() will
return 'BraceStmt *' and FuncDecl::getFuncExpr() will be gone.


Swift SVN r8050
This commit is contained in:
Dmitri Hrybenko
2013-09-09 19:57:27 +00:00
parent 485e1f4eb5
commit 1e23c936e0
18 changed files with 67 additions and 65 deletions

View File

@@ -62,7 +62,7 @@ public:
virtual bool walkToDeclPre(Decl *D) {
if (auto FD = dyn_cast<FuncDecl>(D)) {
if (auto FE = FD->getBody()) {
if (auto FE = FD->getFuncExpr()) {
if (FE->getBodyKind() != FuncExpr::BodyKind::Unparsed)
return false;
parseFunctionBody(FD);
@@ -74,7 +74,7 @@ public:
private:
void parseFunctionBody(FuncDecl *FD) {
auto FE = FD->getBody();
auto FE = FD->getFuncExpr();
assert(FE);
assert(FE->getBodyKind() == FuncExpr::BodyKind::Unparsed);