aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-23 08:35:12 +0000
committerChris Lattner <sabre@nondot.org>2010-11-23 08:35:12 +0000
commit5159f6162e894deedb0be1ab53e3e0f823c9db5d (patch)
tree6ad37aa5c3f6564eb01bc7a75e0749e9b7829204 /clang/lib/Basic/SourceManager.cpp
parent5c1d4e3b1ea05949052737e5cdf11ef228231543 (diff)
downloadllvm-5159f6162e894deedb0be1ab53e3e0f823c9db5d.zip
llvm-5159f6162e894deedb0be1ab53e3e0f823c9db5d.tar.gz
llvm-5159f6162e894deedb0be1ab53e3e0f823c9db5d.tar.bz2
now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. llvm-svn: 120010
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 2e47cdc..eaa9118 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -73,9 +73,7 @@ const llvm::MemoryBuffer *ContentCache::getBuffer(Diagnostic &Diag,
// Lazily create the Buffer for ContentCaches that wrap files.
if (!Buffer.getPointer() && Entry) {
std::string ErrorStr;
- Buffer.setPointer(SM.getFileManager().getBufferForFile(Entry,
- SM.getFileSystemOpts(),
- &ErrorStr));
+ Buffer.setPointer(SM.getFileManager().getBufferForFile(Entry, &ErrorStr));
// If we were unable to open the file, then we are in an inconsistent
// situation where the content cache referenced a file which no longer
@@ -332,9 +330,8 @@ LineTableInfo &SourceManager::getLineTable() {
// Private 'Create' methods.
//===----------------------------------------------------------------------===//
-SourceManager::SourceManager(Diagnostic &Diag, FileManager &FileMgr,
- const FileSystemOptions &FSOpts)
- : Diag(Diag), FileMgr(FileMgr), FileSystemOpts(FSOpts),
+SourceManager::SourceManager(Diagnostic &Diag, FileManager &FileMgr)
+ : Diag(Diag), FileMgr(FileMgr),
ExternalSLocEntries(0), LineTable(0), NumLinearScans(0),
NumBinaryProbes(0) {
clearIDTables();