summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-03-26 14:17:26 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-03-26 14:17:26 +0000
commit3e6719c133f87f1c3d8d9085181fed85d33fd93d (patch)
treece9d4e8125039aeeddfc6b8b48d6ceb0ffdd1b1f /llvm/lib/CodeGen
parent40b099b0680e8a6b99167fba6e1e6b228e8935bd (diff)
downloadbcm5719-llvm-3e6719c133f87f1c3d8d9085181fed85d33fd93d.tar.gz
bcm5719-llvm-3e6719c133f87f1c3d8d9085181fed85d33fd93d.zip
No need to do an expensive stable sort for a bunch of integers.
llvm-svn: 153438
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
index 8370f5f0fc7..660684d1bea 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp
@@ -15,6 +15,7 @@
#include "DwarfDebug.h"
#include "DIE.h"
#include "llvm/ADT/Twine.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCStreamer.h"
@@ -68,11 +69,10 @@ void DwarfAccelTable::AddName(StringRef Name, DIE* die, char Flags) {
void DwarfAccelTable::ComputeBucketCount(void) {
// First get the number of unique hashes.
- std::vector<uint32_t> uniques;
- uniques.resize(Data.size());
+ std::vector<uint32_t> uniques(Data.size());
for (size_t i = 0, e = Data.size(); i < e; ++i)
uniques[i] = Data[i]->HashValue;
- std::stable_sort(uniques.begin(), uniques.end());
+ array_pod_sort(uniques.begin(), uniques.end());
std::vector<uint32_t>::iterator p =
std::unique(uniques.begin(), uniques.end());
uint32_t num = std::distance(uniques.begin(), p);
OpenPOWER on IntegriCloud