mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user