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 | 03fd362dbf6fcd077df566fe2ac3165be668323b (patch) | |
tree | 6ef8fa618db762bc1fab8323bee887e261bd8541 /lib/Basic/FileManager.cpp | |
parent | d47aad92ccfb6c2cf5921f8fefddd7e541dc9bb3 (diff) |
Check in the implementation as well...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/FileManager.cpp')
-rw-r--r-- | lib/Basic/FileManager.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp index 2599cee3ae..add4ec00b1 100644 --- a/lib/Basic/FileManager.cpp +++ b/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()); |