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 | f28df4cdba9e82c15136ac4f2010ba50e9071141 (patch) | |
tree | 498574ea9b2896f4088b598d4aaf73e101c8824a /clang/lib/Basic | |
parent | 559e09e39de1cebf132c4d1d3c10763560e0c2e8 (diff) | |
download | bcm5719-llvm-f28df4cdba9e82c15136ac4f2010ba50e9071141.tar.gz bcm5719-llvm-f28df4cdba9e82c15136ac4f2010ba50e9071141.zip |
Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.
llvm-svn: 122087
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/FileManager.cpp | 9 | ||||
-rw-r--r-- | clang/lib/Basic/FileSystemStatCache.cpp | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Basic/FileManager.cpp b/clang/lib/Basic/FileManager.cpp index 488d4c3b8df..921778d7d1c 100644 --- a/clang/lib/Basic/FileManager.cpp +++ b/clang/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; } diff --git a/clang/lib/Basic/FileSystemStatCache.cpp b/clang/lib/Basic/FileSystemStatCache.cpp index d9e89cd8dfd..c8b07af295d 100644 --- a/clang/lib/Basic/FileSystemStatCache.cpp +++ b/clang/lib/Basic/FileSystemStatCache.cpp @@ -113,7 +113,7 @@ MemorizeStatCalls::getStat(const char *Path, struct stat &StatBuf, return Result; // Cache file 'stat' results and directories with absolutely paths. - if (!S_ISDIR(StatBuf.st_mode) || llvm::sys::Path(Path).isAbsolute()) + if (!S_ISDIR(StatBuf.st_mode) || llvm::sys::path::is_absolute(Path)) StatCalls[Path] = StatBuf; return Result; |