From 03fd362dbf6fcd077df566fe2ac3165be668323b Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Mon, 7 Mar 2011 01:28:33 +0000 Subject: [PATCH] Check in the implementation as well... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127144 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/FileManager.cpp | 10 +++++++--- 1 file 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 &path, path = NewPath; } +void FileManager::FixupRelativePath(llvm::SmallVectorImpl &path) const { + FixupRelativePath(path, FileSystemOpts); +} + llvm::MemoryBuffer *FileManager:: getBufferForFile(const FileEntry *Entry, std::string *ErrorStr) { llvm::OwningPtr 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()); -- 2.40.0