From: Michael J. Spencer Date: Wed, 29 Feb 2012 00:06:24 +0000 (+0000) Subject: [PathV2] Fix bug in relative_path. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d0fff1886cbace4e663761f2c26dc0a5eed2b6b1;p=oota-llvm.git [PathV2] Fix bug in relative_path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151675 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp index 3ef13e253f0..bf8672bc57b 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,