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

@@ -19,7 +19,6 @@
#include "swift/AST/ASTContext.h"
#include "swift/AST/Builtins.h"
#include "swift/AST/Module.h"
#include "swift/AST/SILLayout.h"
#include "swift/AST/SILOptions.h"
#include "swift/Basic/LangOptions.h"
@@ -58,8 +57,10 @@ class Output;
namespace swift {
class AnyFunctionType;
class ASTContext;
class FileUnit;
class FuncDecl;
class KeyPathPattern;
class ModuleDecl;
class SILUndef;
class SourceFile;
class SerializedSILLoader;
@@ -345,15 +346,12 @@ public:
/// later parse SIL bodies directly into, without converting from an AST.
static std::unique_ptr<SILModule>
createEmptyModule(ModuleDecl *M, SILOptions &Options,
bool WholeModule = false) {
return std::unique_ptr<SILModule>(
new SILModule(M, Options, M, WholeModule));
}
bool WholeModule = false);
/// Get the Swift module associated with this SIL module.
ModuleDecl *getSwiftModule() const { return TheSwiftModule; }
/// Get the AST context used for type uniquing etc. by this SIL module.
ASTContext &getASTContext() const { return TheSwiftModule->getASTContext(); }
ASTContext &getASTContext() const;
SourceManager &getSourceManager() const { return getASTContext().SourceMgr; }
/// Get the Swift DeclContext associated with this SIL module.