[llvm-commits] [llvm] r82363 - /llvm/trunk/lib/Support/CommandLine.cpp

Chris Lattner sabre at nondot.org
Sat Sep 19 22:06:24 PDT 2009


Author: lattner
Date: Sun Sep 20 00:06:23 2009
New Revision: 82363

URL: http://llvm.org/viewvc/llvm-project?rev=82363&view=rev
Log:
change an std::sort to an array_pod_sort call, shrinking CommandLine.o by 9%.

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

Modified: llvm/trunk/lib/Support/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=82363&r1=82362&r2=82363&view=diff

==============================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp (original)
+++ llvm/trunk/lib/Support/CommandLine.cpp Sun Sep 20 00:06:23 2009
@@ -27,6 +27,7 @@
 #include "llvm/ADT/OwningPtr.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/Config/config.h"
 #include <set>
@@ -1150,7 +1151,7 @@
       Targets.push_back(std::make_pair(it->getName(), &*it));
       Width = std::max(Width, Targets.back().first.length());
     }
-    std::sort(Targets.begin(), Targets.end());
+    array_pod_sort(Targets.begin(), Targets.end());
 
     for (unsigned i = 0, e = Targets.size(); i != e; ++i) {
       outs() << "    " << Targets[i].first;





More information about the llvm-commits mailing list