diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 08:20:47 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-13 08:20:47 +0000 |
commit | 5eb810024dc8a1d12d5f066c02c978f07c4fcb00 (patch) | |
tree | 2ed8a314e87a0e312408af4deef30d973abae917 /lib/Frontend/CompilerInstance.cpp | |
parent | fc7ac8f0b9ffd83b9e7329926e9e184586b49138 (diff) |
Add ASTContext to CompilerInstance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87095 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index e1ae63cf37..0829ce32cc 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "clang/Frontend/CompilerInstance.h" +#include "clang/AST/ASTContext.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" @@ -152,3 +153,14 @@ CompilerInstance::createPreprocessor(Diagnostic &Diags, return PP; } + +// ASTContext + +void CompilerInstance::createASTContext() { + Preprocessor &PP = getPreprocessor(); + Context.reset(new ASTContext(getLangOpts(), PP.getSourceManager(), + getTarget(), PP.getIdentifierTable(), + PP.getSelectorTable(), PP.getBuiltinInfo(), + /*FreeMemory=*/ !getFrontendOpts().DisableFree, + /*size_reserve=*/ 0)); +} |