[llvm] r367744 - MCRegister/Register: DenseMapInfo should take `const T &`

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 19:19:23 PDT 2019


Author: dsanders
Date: Fri Aug  2 19:19:23 2019
New Revision: 367744

URL: http://llvm.org/viewvc/llvm-project?rev=367744&view=rev
Log:
MCRegister/Register: DenseMapInfo should take `const T &`

Modified:
    llvm/trunk/include/llvm/CodeGen/Register.h
    llvm/trunk/include/llvm/MC/MCRegister.h

Modified: llvm/trunk/include/llvm/CodeGen/Register.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Register.h?rev=367744&r1=367743&r2=367744&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/Register.h (original)
+++ llvm/trunk/include/llvm/CodeGen/Register.h Fri Aug  2 19:19:23 2019
@@ -123,10 +123,10 @@ template<> struct DenseMapInfo<Register>
   static inline unsigned getTombstoneKey() {
     return DenseMapInfo<unsigned>::getTombstoneKey();
   }
-  static unsigned getHashValue(const unsigned &Val) {
+  static unsigned getHashValue(const Register &Val) {
     return DenseMapInfo<unsigned>::getHashValue(Val);
   }
-  static bool isEqual(const unsigned &LHS, const unsigned &RHS) {
+  static bool isEqual(const Register &LHS, const Register &RHS) {
     return DenseMapInfo<unsigned>::isEqual(LHS, RHS);
   }
 };

Modified: llvm/trunk/include/llvm/MC/MCRegister.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCRegister.h?rev=367744&r1=367743&r2=367744&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCRegister.h (original)
+++ llvm/trunk/include/llvm/MC/MCRegister.h Fri Aug  2 19:19:23 2019
@@ -73,10 +73,10 @@ template<> struct DenseMapInfo<MCRegiste
   static inline unsigned getTombstoneKey() {
     return DenseMapInfo<unsigned>::getTombstoneKey();
   }
-  static unsigned getHashValue(const unsigned &Val) {
+  static unsigned getHashValue(const MCRegister &Val) {
     return DenseMapInfo<unsigned>::getHashValue(Val);
   }
-  static bool isEqual(const unsigned &LHS, const unsigned &RHS) {
+  static bool isEqual(const MCRegister &LHS, const MCRegister &RHS) {
     return DenseMapInfo<unsigned>::isEqual(LHS, RHS);
   }
 };




More information about the llvm-commits mailing list