diff options
author | Anders Carlsson <andersca@mac.com> | 2011-03-07 01:28:33 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-03-07 01:28:33 +0000 |
commit | 878b3e2b987cb470d1e097c0e9efee621d0f2c7b (patch) | |
tree | 0376d52c8dbc986334ead601feb8bd1f79a1857a /clang/lib/Basic/FileManager.cpp | |
parent | 793aff18ef0de12ff1e66e2bf46603f842ce3071 (diff) | |
download | bcm5719-llvm-878b3e2b987cb470d1e097c0e9efee621d0f2c7b.tar.gz bcm5719-llvm-878b3e2b987cb470d1e097c0e9efee621d0f2c7b.zip |
Check in the implementation as well...
llvm-svn: 127144
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index 2599cee3ae5..add4ec00b1f 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/lib/Basic/FileManager.cpp @@ -462,6 +462,10 @@ void FileManager::FixupRelativePath(llvm::SmallVectorImpl<char> &path, path = NewPath; } +void FileManager::FixupRelativePath(llvm::SmallVectorImpl<char> &path) const { + FixupRelativePath(path, FileSystemOpts); +} + llvm::MemoryBuffer *FileManager:: getBufferForFile(const FileEntry *Entry, std::string *ErrorStr) { llvm::OwningPtr<llvm::MemoryBuffer> Result; @@ -488,7 +492,7 @@ getBufferForFile(const FileEntry *Entry, std::string *ErrorStr) { } llvm::SmallString<128> FilePath(Entry->getName()); - FixupRelativePath(FilePath, FileSystemOpts); + FixupRelativePath(FilePath); ec = llvm::MemoryBuffer::getFile(FilePath.str(), Result, Entry->getSize()); if (ec && ErrorStr) *ErrorStr = ec.message(); @@ -507,7 +511,7 @@ getBufferForFile(llvm::StringRef Filename, std::string *ErrorStr) { } llvm::SmallString<128> FilePath(Filename); - FixupRelativePath(FilePath, FileSystemOpts); + FixupRelativePath(FilePath); ec = llvm::MemoryBuffer::getFile(FilePath.c_str(), Result); if (ec && ErrorStr) *ErrorStr = ec.message(); @@ -528,7 +532,7 @@ bool FileManager::getStatValue(const char *Path, struct stat &StatBuf, StatCache.get()); llvm::SmallString<128> FilePath(Path); - FixupRelativePath(FilePath, FileSystemOpts); + FixupRelativePath(FilePath); return FileSystemStatCache::get(FilePath.c_str(), StatBuf, FileDescriptor, StatCache.get()); |