mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Code review feedback from @davidungar
This commit is contained in:
@@ -2337,6 +2337,12 @@ bool SourceFile::hasDelayedBodyParsing() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Add a hoisted declaration. See Decl::isHoisted().
|
||||
void SourceFile::addHoistedDecl(Decl *d) {
|
||||
assert(d->isHoisted());
|
||||
Hoisted.push_back(d);
|
||||
}
|
||||
|
||||
ArrayRef<Decl *> SourceFile::getTopLevelDecls() const {
|
||||
auto &ctx = getASTContext();
|
||||
auto *mutableThis = const_cast<SourceFile *>(this);
|
||||
|
||||
Reference in New Issue
Block a user