aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-17 21:22:22 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-17 21:22:22 +0000
commit256053b31e697fdf0cc48f17d621c82fc3b8dff0 (patch)
treea045971178194699343a772ba4d43a7da868c067 /lib/Frontend
parent854fc56c95845660fccb1cb165fbf33fb9ae09a8 (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/Frontend')
-rw-r--r--lib/Frontend/CacheTokens.cpp5
-rw-r--r--lib/Frontend/InitHeaderSearch.cpp4
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp
index ee8c8aaa2c..cd5723aa82 100644
--- a/lib/Frontend/CacheTokens.cpp
+++ b/lib/Frontend/CacheTokens.cpp
@@ -475,8 +475,7 @@ void PTHWriter::GeneratePTH(const std::string &MainFile) {
const FileEntry *FE = C.Entry;
// FIXME: Handle files with non-absolute paths.
- llvm::sys::Path P(FE->getName());
- if (!P.isAbsolute())
+ if (llvm::sys::path::is_relative(FE->getName()))
continue;
const llvm::MemoryBuffer *B = C.getBuffer(PP.getDiagnostics(), SM);
@@ -525,7 +524,7 @@ public:
PM.insert(PTHEntryKeyVariant(Path), PTHEntry());
else if (S_ISDIR(StatBuf.st_mode)) {
// Only cache directories with absolute paths.
- if (!llvm::sys::Path(Path).isAbsolute())
+ if (llvm::sys::path::is_relative(Path))
return Result;
PM.insert(PTHEntryKeyVariant(&StatBuf, Path), PTHEntry());
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 438556e8da..5bae3ea396 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -106,10 +106,10 @@ void InitHeaderSearch::AddPath(const llvm::Twine &Path,
// Compute the actual path, taking into consideration -isysroot.
llvm::SmallString<256> MappedPathStorage;
llvm::StringRef MappedPathStr = Path.toStringRef(MappedPathStorage);
- llvm::sys::Path MappedPath(MappedPathStr);
// Handle isysroot.
- if (Group == System && !IgnoreSysRoot && MappedPath.isAbsolute() &&
+ if (Group == System && !IgnoreSysRoot &&
+ llvm::sys::path::is_absolute(MappedPathStr) &&
IncludeSysroot != llvm::sys::Path::GetRootDirectory()) {
MappedPathStorage.clear();
MappedPathStr =