r214668 - Driver: Simplify a use of the path API
Justin Bogner
mail at justinbogner.com
Sun Aug 3 14:46:33 PDT 2014
Author: bogner
Date: Sun Aug 3 16:46:33 2014
New Revision: 214668
URL: http://llvm.org/viewvc/llvm-project?rev=214668&view=rev
Log:
Driver: Simplify a use of the path API
It's a bit more obvious what's going on if we use path::filename
rather than decrementing an iterator here.
Modified:
cfe/trunk/lib/Driver/Multilib.cpp
Modified: cfe/trunk/lib/Driver/Multilib.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Multilib.cpp?rev=214668&r1=214667&r2=214668&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Multilib.cpp (original)
+++ cfe/trunk/lib/Driver/Multilib.cpp Sun Aug 3 16:46:33 2014
@@ -37,7 +37,7 @@ static void normalizePathSegment(std::st
// Prune trailing "/" or "./"
while (1) {
- StringRef last = *--path::end(seg);
+ StringRef last = path::filename(seg);
if (last != ".")
break;
seg = path::parent_path(seg);
More information about the cfe-commits
mailing list