forked from OSchip/llvm-project
ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support this as an argument.
llvm-svn: 96316
This commit is contained in:
parent
7f21a7f7ce
commit
1951192213
|
@ -135,7 +135,6 @@ public:
|
|||
static ASTUnit *LoadFromPCHFile(const std::string &Filename,
|
||||
Diagnostic &Diags,
|
||||
bool OnlyLocalDecls = false,
|
||||
bool UseBumpAllocator = false,
|
||||
RemappedFile *RemappedFiles = 0,
|
||||
unsigned NumRemappedFiles = 0);
|
||||
|
||||
|
@ -173,7 +172,6 @@ public:
|
|||
Diagnostic &Diags,
|
||||
llvm::StringRef ResourceFilesPath,
|
||||
bool OnlyLocalDecls = false,
|
||||
bool UseBumpAllocator = false,
|
||||
RemappedFile *RemappedFiles = 0,
|
||||
unsigned NumRemappedFiles = 0);
|
||||
};
|
||||
|
|
|
@ -38,7 +38,7 @@ void ASTMergeAction::ExecuteAction() {
|
|||
&CI.getASTContext());
|
||||
for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) {
|
||||
ASTUnit *Unit = ASTUnit::LoadFromPCHFile(ASTFiles[I], CI.getDiagnostics(),
|
||||
false, true);
|
||||
false);
|
||||
if (!Unit)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -104,7 +104,6 @@ const std::string &ASTUnit::getPCHFileName() {
|
|||
ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename,
|
||||
Diagnostic &Diags,
|
||||
bool OnlyLocalDecls,
|
||||
bool UseBumpAllocator,
|
||||
RemappedFile *RemappedFiles,
|
||||
unsigned NumRemappedFiles) {
|
||||
llvm::OwningPtr<ASTUnit> AST(new ASTUnit(true));
|
||||
|
@ -184,7 +183,7 @@ ASTUnit *ASTUnit::LoadFromPCHFile(const std::string &Filename,
|
|||
PP.getIdentifierTable(),
|
||||
PP.getSelectorTable(),
|
||||
PP.getBuiltinInfo(),
|
||||
/* FreeMemory = */ !UseBumpAllocator,
|
||||
/* FreeMemory = */ false,
|
||||
/* size_reserve = */0));
|
||||
ASTContext &Context = *AST->Ctx.get();
|
||||
|
||||
|
@ -312,7 +311,6 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin,
|
|||
Diagnostic &Diags,
|
||||
llvm::StringRef ResourceFilesPath,
|
||||
bool OnlyLocalDecls,
|
||||
bool UseBumpAllocator,
|
||||
RemappedFile *RemappedFiles,
|
||||
unsigned NumRemappedFiles) {
|
||||
llvm::SmallVector<const char *, 16> Args;
|
||||
|
@ -359,11 +357,11 @@ ASTUnit *ASTUnit::LoadFromCommandLine(const char **ArgBegin,
|
|||
// Override any files that need remapping
|
||||
for (unsigned I = 0; I != NumRemappedFiles; ++I)
|
||||
CI->getPreprocessorOpts().addRemappedFile(RemappedFiles[I].first,
|
||||
RemappedFiles[I].second);
|
||||
RemappedFiles[I].second);
|
||||
|
||||
// Override the resources path.
|
||||
CI->getHeaderSearchOpts().ResourceDir = ResourceFilesPath;
|
||||
|
||||
CI->getFrontendOpts().DisableFree = UseBumpAllocator;
|
||||
CI->getFrontendOpts().DisableFree = true;
|
||||
return LoadFromCompilerInvocation(CI.take(), Diags, OnlyLocalDecls);
|
||||
}
|
||||
|
|
|
@ -961,8 +961,7 @@ CXTranslationUnit clang_createTranslationUnit(CXIndex CIdx,
|
|||
Diags->setClient(&DiagClient);
|
||||
|
||||
return ASTUnit::LoadFromPCHFile(ast_filename, *Diags,
|
||||
CXXIdx->getOnlyLocalDecls(),
|
||||
/* UseBumpAllocator = */ true);
|
||||
CXXIdx->getOnlyLocalDecls());
|
||||
}
|
||||
|
||||
CXTranslationUnit
|
||||
|
@ -1018,7 +1017,6 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx,
|
|||
*Diags,
|
||||
CXXIdx->getClangResourcesPath(),
|
||||
CXXIdx->getOnlyLocalDecls(),
|
||||
/* UseBumpAllocator = */ true,
|
||||
RemappedFiles.data(),
|
||||
RemappedFiles.size()));
|
||||
|
||||
|
@ -1115,7 +1113,6 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx,
|
|||
|
||||
ASTUnit *ATU = ASTUnit::LoadFromPCHFile(astTmpFile, *Diags,
|
||||
CXXIdx->getOnlyLocalDecls(),
|
||||
/* UseBumpAllocator = */ true,
|
||||
RemappedFiles.data(),
|
||||
RemappedFiles.size());
|
||||
if (ATU)
|
||||
|
|
Loading…
Reference in New Issue