aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/PathV2.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-01 03:18:17 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-01 03:18:17 +0000
commita9793559942dd055d460f8e3d438b49889eb4f5c (patch)
tree308e91c1a56edcdd779628e1d6fe17638b6ef292 /lib/Support/PathV2.cpp
parentff25116a097230f6fff309a73a9b0610631282a6 (diff)
downloadexternal_llvm-a9793559942dd055d460f8e3d438b49889eb4f5c.zip
external_llvm-a9793559942dd055d460f8e3d438b49889eb4f5c.tar.gz
external_llvm-a9793559942dd055d460f8e3d438b49889eb4f5c.tar.bz2
Support/PathV2: Add filename implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/PathV2.cpp')
-rw-r--r--lib/Support/PathV2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp
index 7bb7988..9c343ea 100644
--- a/lib/Support/PathV2.cpp
+++ b/lib/Support/PathV2.cpp
@@ -553,6 +553,11 @@ error_code native(const Twine &path, SmallVectorImpl<char> &result) {
return make_error_code(errc::success);
}
+error_code filename(const StringRef &path, StringRef &result) {
+ result = *(--end(path));
+ return make_error_code(errc::success);
+}
+
}
}
}