[cfe-commits] r106453 - /cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
Fariborz Jahanian
fjahanian at apple.com
Mon Jun 21 12:49:38 PDT 2010
Author: fjahanian
Date: Mon Jun 21 14:49:38 2010
New Revision: 106453
URL: http://llvm.org/viewvc/llvm-project?rev=106453&view=rev
Log:
Use more efficient API of SmallVector/array_pod_sort
for sorting (radar 8076356).
Modified:
cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
Modified: cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDeclCXX.cpp?rev=106453&r1=106452&r2=106453&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDeclCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDeclCXX.cpp Mon Jun 21 14:49:38 2010
@@ -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);
More information about the cfe-commits
mailing list