change an std::sort to an array_pod_sort call, shrinking CommandLine.o by 9%.
authorChris Lattner <sabre@nondot.org>
Sun, 20 Sep 2009 05:06:23 +0000 (05:06 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 20 Sep 2009 05:06:23 +0000 (05:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82363 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/CommandLine.cpp

index fbd58aad95256118a44886839529f02cd595f265..2e69b11d2bd6733d5866ff085f19906357d6f8b1 100644 (file)
@@ -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 @@ public:
       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;