diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-17 21:22:22 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-17 21:22:22 +0000 |
commit | 256053b31e697fdf0cc48f17d621c82fc3b8dff0 (patch) | |
tree | a045971178194699343a772ba4d43a7da868c067 /lib/Basic/FileManager.cpp | |
parent | 854fc56c95845660fccb1cb165fbf33fb9ae09a8 (diff) |
Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/FileManager.cpp')
-rw-r--r-- | lib/Basic/FileManager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp index 488d4c3b8d..921778d7d1 100644 --- a/lib/Basic/FileManager.cpp +++ b/lib/Basic/FileManager.cpp @@ -392,10 +392,11 @@ FileManager::getVirtualFile(llvm::StringRef Filename, off_t Size, void FileManager::FixupRelativePath(llvm::sys::Path &path, const FileSystemOptions &FSOpts) { - if (FSOpts.WorkingDir.empty() || path.isAbsolute()) return; - - llvm::sys::Path NewPath(FSOpts.WorkingDir); - NewPath.appendComponent(path.str()); + if (FSOpts.WorkingDir.empty() || llvm::sys::path::is_absolute(path.str())) + return; + + llvm::SmallString<128> NewPath(FSOpts.WorkingDir); + llvm::sys::path::append(NewPath, path.str()); path = NewPath; } |