summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 0325ba5734a..5c39c2b5399 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -15,6 +15,8 @@
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
+#include "clang/AST/Expr.h"
+#include "clang/AST/RecordLayout.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
@@ -27,6 +29,18 @@ enum FloatingRank {
FloatRank, DoubleRank, LongDoubleRank
};
+ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM, TargetInfo &t,
+ IdentifierTable &idents, SelectorTable &sels,
+ unsigned size_reserve) :
+ CFConstantStringTypeDecl(0), SourceMgr(SM), LangOpts(LOpts), Target(t),
+ Idents(idents), Selectors(sels)
+{
+ if (size_reserve > 0) Types.reserve(size_reserve);
+ InitBuiltinTypes();
+ BuiltinInfo.InitializeBuiltins(idents, Target);
+ TUDecl = TranslationUnitDecl::Create(*this);
+}
+
ASTContext::~ASTContext() {
// Deallocate all the types.
while (!Types.empty()) {
OpenPOWER on IntegriCloud