summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/PathV2.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2012-02-29 00:06:24 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2012-02-29 00:06:24 +0000
commite646239e5e91176bcd9d54acbd7a37a6d722f9ae (patch)
treeae1180f6d8184fa6ba5a87019eadb07dac9539a9 /llvm/lib/Support/PathV2.cpp
parent576cbd03b4e1aaddf28caec97fb6146dc070da8c (diff)
downloadbcm5719-llvm-e646239e5e91176bcd9d54acbd7a37a6d722f9ae.tar.gz
bcm5719-llvm-e646239e5e91176bcd9d54acbd7a37a6d722f9ae.zip
[PathV2] Fix bug in relative_path.
llvm-svn: 151675
Diffstat (limited to 'llvm/lib/Support/PathV2.cpp')
-rw-r--r--llvm/lib/Support/PathV2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/PathV2.cpp b/llvm/lib/Support/PathV2.cpp
index 3ef13e253f0..bf8672bc57b 100644
--- a/llvm/lib/Support/PathV2.cpp
+++ b/llvm/lib/Support/PathV2.cpp
@@ -346,7 +346,7 @@ const StringRef root_directory(StringRef path) {
const StringRef relative_path(StringRef path) {
StringRef root = root_path(path);
- return root.substr(root.size());
+ return path.substr(root.size());
}
void append(SmallVectorImpl<char> &path, const Twine &a,
OpenPOWER on IntegriCloud