Move the DeclContext base class from FuncExpr to FuncDecl

FuncDecl still has a FuncExpr because capture list is stored in FuncExpr
(which is a CapturingExpr).


Swift SVN r8179
This commit is contained in:
Dmitri Hrybenko
2013-09-13 01:40:41 +00:00
parent 63ecd5c9d1
commit 0d6d9a0ffb
27 changed files with 208 additions and 201 deletions

View File

@@ -225,8 +225,12 @@ void Mangler::mangleDeclContext(DeclContext *ctx) {
return;
}
case DeclContextKind::FuncExpr: {
auto *FD = cast<FuncExpr>(ctx)->getDecl();
case DeclContextKind::PipeClosureExpr:
case DeclContextKind::ClosureExpr:
llvm_unreachable("unnamed closure mangling not yet implemented");
case DeclContextKind::FuncDecl: {
auto *FD = cast<FuncDecl>(ctx);
// FIXME: We need a real solution here for local types.
if (FD->isGetterOrSetter()) {
mangleGetterOrSetterContext(FD);
@@ -236,10 +240,6 @@ void Mangler::mangleDeclContext(DeclContext *ctx) {
return;
}
case DeclContextKind::PipeClosureExpr:
case DeclContextKind::ClosureExpr:
llvm_unreachable("unnamed closure mangling not yet implemented");
case DeclContextKind::ConstructorDecl:
mangleDeclName(cast<ConstructorDecl>(ctx), IncludeType::Yes);
return;