OSDN Git Service

llvm-objdump: Pass DiceTableEntry by reference
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 4 Nov 2014 08:41:48 +0000 (08:41 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 4 Nov 2014 08:41:48 +0000 (08:41 +0000)
DiceTableEntry is 24 bytes on my machine, it's probably better to pass
them by reference.

This fixes PR21464.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221247 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objdump/MachODump.cpp

index 50afab7..362a1ba 100644 (file)
@@ -124,8 +124,8 @@ typedef std::pair<uint64_t, DiceRef> DiceTableEntry;
 typedef std::vector<DiceTableEntry> DiceTable;
 typedef DiceTable::iterator dice_table_iterator;
 
-static bool compareDiceTableEntries(const DiceTableEntry i,
-                                    const DiceTableEntry j) {
+static bool compareDiceTableEntries(const DiceTableEntry &i,
+                                    const DiceTableEntry &j) {
   return i.first == j.first;
 }