[cfe-commits] r96316 - in /cfe/trunk: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTMerge.cpp lib/Frontend/ASTUnit.cpp tools/CIndex/CIndex.cpp
Daniel Dunbar
daniel at zuster.org
Mon Feb 15 17:55:04 PST 2010
Author: ddunbar
Date: Mon Feb 15 19:55:04 2010
New Revision: 96316
URL: http://llvm.org/viewvc/llvm-project?rev=96316&view=rev
Log:
ASTUnit: Constant fold UseBumpAllocator to true, we don't care to support this as an argument.
Modified:
cfe/trunk/include/clang/Frontend/ASTUnit.h
cfe/trunk/lib/Frontend/ASTMerge.cpp
cfe/trunk/lib/Frontend/ASTUnit.cpp
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/include/clang/Frontend/ASTUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/ASTUnit.h?rev=96316&r1=96315&r2=96316&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/ASTUnit.h (original)
+++ cfe/trunk/include/clang/Frontend/ASTUnit.h Mon Feb 15 19:55:04 2010
@@ -135,7 +135,6 @@
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 @@
Diagnostic &Diags,
llvm::StringRef ResourceFilesPath,
bool OnlyLocalDecls = false,
- bool UseBumpAllocator = false,
RemappedFile *RemappedFiles = 0,
unsigned NumRemappedFiles = 0);
};
Modified: cfe/trunk/lib/Frontend/ASTMerge.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTMerge.cpp?rev=96316&r1=96315&r2=96316&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTMerge.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTMerge.cpp Mon Feb 15 19:55:04 2010
@@ -38,7 +38,7 @@
&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;
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=96316&r1=96315&r2=96316&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Mon Feb 15 19:55:04 2010
@@ -104,7 +104,6 @@
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 @@
PP.getIdentifierTable(),
PP.getSelectorTable(),
PP.getBuiltinInfo(),
- /* FreeMemory = */ !UseBumpAllocator,
+ /* FreeMemory = */ false,
/* size_reserve = */0));
ASTContext &Context = *AST->Ctx.get();
@@ -312,7 +311,6 @@
Diagnostic &Diags,
llvm::StringRef ResourceFilesPath,
bool OnlyLocalDecls,
- bool UseBumpAllocator,
RemappedFile *RemappedFiles,
unsigned NumRemappedFiles) {
llvm::SmallVector<const char *, 16> Args;
@@ -359,11 +357,11 @@
// 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);
}
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=96316&r1=96315&r2=96316&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Mon Feb 15 19:55:04 2010
@@ -961,8 +961,7 @@
Diags->setClient(&DiagClient);
return ASTUnit::LoadFromPCHFile(ast_filename, *Diags,
- CXXIdx->getOnlyLocalDecls(),
- /* UseBumpAllocator = */ true);
+ CXXIdx->getOnlyLocalDecls());
}
CXTranslationUnit
@@ -1018,7 +1017,6 @@
*Diags,
CXXIdx->getClangResourcesPath(),
CXXIdx->getOnlyLocalDecls(),
- /* UseBumpAllocator = */ true,
RemappedFiles.data(),
RemappedFiles.size()));
@@ -1115,7 +1113,6 @@
ASTUnit *ATU = ASTUnit::LoadFromPCHFile(astTmpFile, *Diags,
CXXIdx->getOnlyLocalDecls(),
- /* UseBumpAllocator = */ true,
RemappedFiles.data(),
RemappedFiles.size());
if (ATU)
More information about the cfe-commits
mailing list