OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d7ce5f
)
Support/PathV2: Add missing has_relative_path impl.
author
Michael J. Spencer
<bigcheesegs@gmail.com>
Mon, 20 Dec 2010 13:30:28 +0000
(13:30 +0000)
committer
Michael J. Spencer
<bigcheesegs@gmail.com>
Mon, 20 Dec 2010 13:30:28 +0000
(13:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122243
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/PathV2.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/PathV2.cpp
b/lib/Support/PathV2.cpp
index
6d2ca4e
..
335f7ff
100644
(file)
--- a/
lib/Support/PathV2.cpp
+++ b/
lib/Support/PathV2.cpp
@@
-502,6
+502,13
@@
bool has_root_path(const Twine &path) {
return !root_path(p).empty();
}
+bool has_relative_path(const Twine &path) {
+ SmallString<128> path_storage;
+ StringRef p = path.toStringRef(path_storage);
+
+ return !relative_path(p).empty();
+}
+
bool has_filename(const Twine &path) {
SmallString<128> path_storage;
StringRef p = path.toStringRef(path_storage);