summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-05-03 03:46:04 +0000
committerAlp Toker <alp@nuanti.com>2014-05-03 03:46:04 +0000
commit080434373383ed7883c7fda8d17e75eec13888f3 (patch)
treeb4b20d6ef636d75a5af46da1cd8433555b4be3d5 /clang/lib/AST/ASTContext.cpp
parentb6cc592ea3195d49bee6c59f24a071d18865cb57 (diff)
downloadbcm5719-llvm-080434373383ed7883c7fda8d17e75eec13888f3.tar.gz
bcm5719-llvm-080434373383ed7883c7fda8d17e75eec13888f3.zip
Eliminate ASTContext's DelayInitialization flag
Having various possible states of initialization following construction doesn't add value here. Also remove the unused size_reserve parameter. llvm-svn: 207897
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index c6f8e20a17c..e46a6c024d7 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -724,11 +724,8 @@ static bool isAddrSpaceMapManglingEnabled(const TargetInfo &TI,
}
ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
- const TargetInfo *t,
IdentifierTable &idents, SelectorTable &sels,
- Builtin::Context &builtins,
- unsigned size_reserve,
- bool DelayInitialization)
+ Builtin::Context &builtins)
: FunctionProtoTypes(this_()),
TemplateSpecializationTypes(this_()),
DependentTemplateSpecializationTypes(this_()),
@@ -746,7 +743,7 @@ ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
NullTypeSourceInfo(QualType()),
FirstLocalImport(), LastLocalImport(),
SourceMgr(SM), LangOpts(LOpts),
- AddrSpaceMap(0), Target(t), PrintingPolicy(LOpts),
+ AddrSpaceMap(0), Target(0), PrintingPolicy(LOpts),
Idents(idents), Selectors(sels),
BuiltinInfo(builtins),
DeclarationNames(*this),
@@ -755,13 +752,7 @@ ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
CommentCommandTraits(BumpAlloc, LOpts.CommentOpts),
LastSDM(0, 0)
{
- if (size_reserve > 0) Types.reserve(size_reserve);
TUDecl = TranslationUnitDecl::Create(*this);
-
- if (!DelayInitialization) {
- assert(t && "No target supplied for ASTContext initialization");
- InitBuiltinTypes(*t);
- }
}
ASTContext::~ASTContext() {
OpenPOWER on IntegriCloud