[llvm-commits] [llvm] r151675 - /llvm/trunk/lib/Support/PathV2.cpp

Michael J. Spencer bigcheesegs at gmail.com
Tue Feb 28 16:06:24 PST 2012


Author: mspencer
Date: Tue Feb 28 18:06:24 2012
New Revision: 151675

URL: http://llvm.org/viewvc/llvm-project?rev=151675&view=rev
Log:
[PathV2] Fix bug in relative_path.

Modified:
    llvm/trunk/lib/Support/PathV2.cpp

Modified: llvm/trunk/lib/Support/PathV2.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PathV2.cpp?rev=151675&r1=151674&r2=151675&view=diff
==============================================================================
--- llvm/trunk/lib/Support/PathV2.cpp (original)
+++ llvm/trunk/lib/Support/PathV2.cpp Tue Feb 28 18:06:24 2012
@@ -346,7 +346,7 @@
 
 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,





More information about the llvm-commits mailing list