aboutsummaryrefslogtreecommitdiff
path: root/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
commitd0fff1886cbace4e663761f2c26dc0a5eed2b6b1 (patch)
tree6a1b31cea3de803c43ad7f79f85597e75326c7b0 /lib/Support/PathV2.cpp
parentc01810eeb7227010f73cb39e3c4fa0197a3c4ef0 (diff)
[PathV2] Fix bug in relative_path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/PathV2.cpp')
-rw-r--r--lib/Support/PathV2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp
index 3ef13e253f..bf8672bc57 100644
--- a/lib/Support/PathV2.cpp
+++ b/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,