AST: Fewer headers include Expr.h, Module.h, Stmt.h

This commit is contained in:
Slava Pestov
2018-04-26 21:15:47 -07:00
parent 37532071e4
commit 175b40919f
23 changed files with 63 additions and 33 deletions

View File

@@ -113,6 +113,17 @@ SILModule::~SILModule() {
F.dropAllReferences();
}
std::unique_ptr<SILModule>
SILModule::createEmptyModule(ModuleDecl *M, SILOptions &Options,
bool WholeModule) {
return std::unique_ptr<SILModule>(
new SILModule(M, Options, M, WholeModule));
}
ASTContext &SILModule::getASTContext() const {
return TheSwiftModule->getASTContext();
}
void *SILModule::allocate(unsigned Size, unsigned Align) const {
if (getASTContext().LangOpts.UseMalloc)
return AlignedAlloc(Size, Align);