From: Justin Bogner Date: Sun, 3 Aug 2014 21:46:33 +0000 (+0000) Subject: Driver: Simplify a use of the path API X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5699807d5eb810f88559ef49fe6333ad584f9cb;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@214668 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Multilib.cpp b/lib/Driver/Multilib.cpp index 484ce1627d..1f5d62f247 100644 --- a/lib/Driver/Multilib.cpp +++ b/lib/Driver/Multilib.cpp @@ -37,7 +37,7 @@ static void normalizePathSegment(std::string &Segment) { // Prune trailing "/" or "./" while (1) { - StringRef last = *--path::end(seg); + StringRef last = path::filename(seg); if (last != ".") break; seg = path::parent_path(seg);