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,