Simplify ModuleFile::getDeclContext()

Swift SVN r8576
This commit is contained in:
Dmitri Hrybenko
2013-09-23 23:06:48 +00:00
parent c9d1aa3f96
commit 9a4c677b9c

View File

@@ -587,12 +587,8 @@ DeclContext *ModuleFile::getDeclContext(DeclID DID) {
return ND;
if (auto ED = dyn_cast<ExtensionDecl>(D))
return ED;
if (auto FD = dyn_cast<FuncDecl>(D))
return FD;
if (auto CD = dyn_cast<ConstructorDecl>(D))
return CD;
if (auto DD = dyn_cast<DestructorDecl>(D))
return DD;
if (auto AFD = dyn_cast<AbstractFunctionDecl>(D))
return AFD;
llvm_unreachable("unknown DeclContext kind");
}