[llvm] r221247 - llvm-objdump: Pass DiceTableEntry by reference

David Majnemer david.majnemer at gmail.com
Tue Nov 4 00:41:48 PST 2014


Author: majnemer
Date: Tue Nov  4 02:41:48 2014
New Revision: 221247

URL: http://llvm.org/viewvc/llvm-project?rev=221247&view=rev
Log:
llvm-objdump: Pass DiceTableEntry by reference

DiceTableEntry is 24 bytes on my machine, it's probably better to pass
them by reference.

This fixes PR21464.

Modified:
    llvm/trunk/tools/llvm-objdump/MachODump.cpp

Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=221247&r1=221246&r2=221247&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Tue Nov  4 02:41:48 2014
@@ -124,8 +124,8 @@ typedef std::pair<uint64_t, DiceRef> Dic
 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;
 }
 





More information about the llvm-commits mailing list