]> granicus.if.org Git - llvm/commitdiff
MCRegister/Register: DenseMapInfo should take `const T &`
authorDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 3 Aug 2019 02:19:23 +0000 (02:19 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Sat, 3 Aug 2019 02:19:23 +0000 (02:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367744 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/Register.h
include/llvm/MC/MCRegister.h

index cc93bc2978b993aef97b984b2467a443772fac59..640bd82bde2c9c51c49db5e3b59ab4e286567e18 100644 (file)
@@ -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);
   }
 };
index 99033aaaf8e059ebe03458e172056ef5db1dd48c..0e889c7adf7a8081304d2e2b1ab0237409c16fcc 100644 (file)
@@ -73,10 +73,10 @@ template<> struct DenseMapInfo<MCRegister> {
   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);
   }
 };