Use more efficient API of SmallVector/array_pod_sort
for sorting (radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106453 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp
index fafc85d..be4e3a5 100644
--- a/lib/CodeGen/CGDeclCXX.cpp
+++ b/lib/CodeGen/CGDeclCXX.cpp
@@ -193,9 +193,9 @@
     CreateGlobalInitOrDestructFunction(*this, FTy, "_GLOBAL__I_a");
 
   if (!PrioritizedCXXGlobalInits.empty()) {
-    std::vector<llvm::Constant*> LocalCXXGlobalInits;
-    std::sort(PrioritizedCXXGlobalInits.begin(), 
-              PrioritizedCXXGlobalInits.end());
+    llvm::SmallVector<llvm::Constant*, 8> LocalCXXGlobalInits;
+    llvm::array_pod_sort(PrioritizedCXXGlobalInits.begin(), 
+                         PrioritizedCXXGlobalInits.end());
     for (unsigned i = 0; i < PrioritizedCXXGlobalInits.size(); i++) {
       llvm::Function *Fn = PrioritizedCXXGlobalInits[i].second;
       LocalCXXGlobalInits.push_back(Fn);