summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-23 07:51:02 +0000
committerChris Lattner <sabre@nondot.org>2010-11-23 07:51:02 +0000
commit3f5a9efb2df0d6728c0ea928704978f223dc1e08 (patch)
tree8ef8b8b7a88eb9ca38016446db6bd68ff27a004f /clang/lib/Frontend
parent3c7cab1402304648b57d86d8e74d409fe7bd7112 (diff)
downloadbcm5719-llvm-3f5a9efb2df0d6728c0ea928704978f223dc1e08.tar.gz
bcm5719-llvm-3f5a9efb2df0d6728c0ea928704978f223dc1e08.zip
give FileManager a 'FileSystemOptions' ivar, which will be used
to simplify a bunch of code in it. It should ultimately get inlined into FileManager. llvm-svn: 120007
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp6
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp2
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index d590d6966ff..cbcb08b6fe3 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -492,7 +492,7 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
AST->CaptureDiagnostics = CaptureDiagnostics;
AST->Diagnostics = Diags;
AST->FileSystemOpts = FileSystemOpts;
- AST->FileMgr.reset(new FileManager);
+ AST->FileMgr.reset(new FileManager(FileSystemOpts));
AST->SourceMgr.reset(new SourceManager(AST->getDiagnostics(),
AST->getFileManager(),
AST->getFileSystemOpts()));
@@ -753,7 +753,7 @@ bool ASTUnit::Parse(llvm::MemoryBuffer *OverrideMainBuffer) {
// Configure the various subsystems.
// FIXME: Should we retain the previous file manager?
- FileMgr.reset(new FileManager);
+ FileMgr.reset(new FileManager(Clang.getFileSystemOpts()));
FileSystemOpts = Clang.getFileSystemOpts();
SourceMgr.reset(new SourceManager(getDiagnostics(), *FileMgr, FileSystemOpts));
TheSema.reset();
@@ -1245,7 +1245,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble(
TopLevelDeclsInPreamble.clear();
// Create a file manager object to provide access to and cache the filesystem.
- Clang.setFileManager(new FileManager);
+ Clang.setFileManager(new FileManager(Clang.getFileSystemOpts()));
// Create the source manager.
Clang.setSourceManager(new SourceManager(getDiagnostics(),
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 67552747d44..06917706bed 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -148,7 +148,7 @@ CompilerInstance::createDiagnostics(const DiagnosticOptions &Opts,
// File Manager
void CompilerInstance::createFileManager() {
- FileMgr.reset(new FileManager());
+ FileMgr.reset(new FileManager(getFileSystemOpts()));
}
// Source Manager
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index b1d6adb94ba..b0c30361dd1 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1563,7 +1563,7 @@ void CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
// PCH file and find the original header name. Remove the need to do that in
// ParsePreprocessorArgs and remove the FileManager & FileSystemOptions
// parameters from the function and the "FileManager.h" #include.
- FileManager FileMgr;
+ FileManager FileMgr(Res.getFileSystemOpts());
ParsePreprocessorArgs(Res.getPreprocessorOpts(), *Args,
FileMgr, Res.getFileSystemOpts(), Diags);
ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), *Args);
OpenPOWER on IntegriCloud