aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-03-14 01:13:54 +0000
committerAnders Carlsson <andersca@mac.com>2011-03-14 01:13:54 +0000
commit2e2468e2d2ccbb9a38fe3b6b754009af7e5d39a9 (patch)
tree9294460a0d3fdefdbcd66a57fb2118434dac407f /lib/Basic
parent4597b7b28e3a71f3c4f0ee3a3bd6a34423e6f885 (diff)
Get rid of the static FileManager::FixupRelativePath.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/FileManager.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp
index add4ec00b1..6512d76aae 100644
--- a/lib/Basic/FileManager.cpp
+++ b/lib/Basic/FileManager.cpp
@@ -450,22 +450,18 @@ FileManager::getVirtualFile(llvm::StringRef Filename, off_t Size,
return UFE;
}
-void FileManager::FixupRelativePath(llvm::SmallVectorImpl<char> &path,
- const FileSystemOptions &FSOpts) {
+void FileManager::FixupRelativePath(llvm::SmallVectorImpl<char> &path) const {
llvm::StringRef pathRef(path.data(), path.size());
- if (FSOpts.WorkingDir.empty() || llvm::sys::path::is_absolute(pathRef))
+ if (FileSystemOpts.WorkingDir.empty()
+ || llvm::sys::path::is_absolute(pathRef))
return;
- llvm::SmallString<128> NewPath(FSOpts.WorkingDir);
+ llvm::SmallString<128> NewPath(FileSystemOpts.WorkingDir);
llvm::sys::path::append(NewPath, pathRef);
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;