[AST] Upgrade MainDecl to a ValueDecl

This will make it easier to store in a SILDeclRef.
This commit is contained in:
Hamish Knight
2021-04-26 11:42:31 +01:00
parent c15dde4265
commit 272090752b
5 changed files with 8 additions and 8 deletions

View File

@@ -1237,9 +1237,9 @@ bool SerializedASTFile::getAllGenericSignatures(
return true;
}
Decl *SerializedASTFile::getMainDecl() const {
ValueDecl *SerializedASTFile::getMainDecl() const {
assert(hasEntryPoint());
return File.getDecl(File.getEntryPointDeclID());
return cast_or_null<ValueDecl>(File.getDecl(File.getEntryPointDeclID()));
}
const version::Version &SerializedASTFile::getLanguageVersionBuiltWith() const {