From d0fff1886cbace4e663761f2c26dc0a5eed2b6b1 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Wed, 29 Feb 2012 00:06:24 +0000 Subject: [PathV2] Fix bug in relative_path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151675 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/PathV2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Support') diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp index 3ef13e2..bf8672b 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 &path, const Twine &a, -- cgit v1.1