summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
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/Frontend
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/Frontend')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp11
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
2 files changed, 6 insertions, 11 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 85945713426..2532d26d6ed 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -723,14 +723,9 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
/*OwnsHeaderSearch=*/false);
Preprocessor &PP = *AST->PP;
- AST->Ctx = new ASTContext(AST->ASTFileLangOpts,
- AST->getSourceManager(),
- /*Target=*/0,
- PP.getIdentifierTable(),
- PP.getSelectorTable(),
- PP.getBuiltinInfo(),
- /* size_reserve = */0,
- /*DelayInitialization=*/true);
+ AST->Ctx = new ASTContext(AST->ASTFileLangOpts, AST->getSourceManager(),
+ PP.getIdentifierTable(), PP.getSelectorTable(),
+ PP.getBuiltinInfo());
ASTContext &Context = *AST->Ctx;
bool disableValid = false;
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index e9672c44266..76301f2a44e 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -300,9 +300,9 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) {
void CompilerInstance::createASTContext() {
Preprocessor &PP = getPreprocessor();
Context = new ASTContext(getLangOpts(), PP.getSourceManager(),
- &getTarget(), PP.getIdentifierTable(),
- PP.getSelectorTable(), PP.getBuiltinInfo(),
- /*size_reserve=*/ 0);
+ PP.getIdentifierTable(), PP.getSelectorTable(),
+ PP.getBuiltinInfo());
+ Context->InitBuiltinTypes(getTarget());
}
// ExternalASTSource
OpenPOWER on IntegriCloud