[llvm] r212641 - Use simpler constructor for range adapter.

Tim Northover tnorthover at apple.com
Wed Jul 9 12:14:35 PDT 2014


Author: tnorthover
Date: Wed Jul  9 14:14:34 2014
New Revision: 212641

URL: http://llvm.org/viewvc/llvm-project?rev=212641&view=rev
Log:
Use simpler constructor for range adapter.

It is a good idea, it's slightly clearer and simpler. Unfortunately
the headline news is: we save one line!

Modified:
    llvm/trunk/include/llvm/Option/ArgList.h

Modified: llvm/trunk/include/llvm/Option/ArgList.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Option/ArgList.h?rev=212641&r1=212640&r2=212641&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Option/ArgList.h (original)
+++ llvm/trunk/include/llvm/Option/ArgList.h Wed Jul  9 14:14:34 2014
@@ -153,8 +153,7 @@ public:
   iterator_range<arg_iterator> filtered(OptSpecifier Id0 = 0U,
                                         OptSpecifier Id1 = 0U,
                                         OptSpecifier Id2 = 0U) const {
-    return iterator_range<arg_iterator>(filtered_begin(Id0, Id1, Id2),
-                                        filtered_end());
+    return make_range(filtered_begin(Id0, Id1, Id2), filtered_end());
   }
 
   /// @}





More information about the llvm-commits mailing list