]> granicus.if.org Git - clang/commitdiff
Check in the implementation as well...
authorAnders Carlsson <andersca@mac.com>
Mon, 7 Mar 2011 01:28:33 +0000 (01:28 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 7 Mar 2011 01:28:33 +0000 (01:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127144 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/FileManager.cpp

index 2599cee3ae53e839122a3841dd651915573d0e5b..add4ec00b1fa56b91ebdca8625fddae399a0542c 100644 (file)
@@ -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());