[llvm] r313779 - Pacify gcc's -Wnum-compare after r313775

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 11:00:02 PDT 2017


Author: hans
Date: Wed Sep 20 11:00:02 2017
New Revision: 313779

URL: http://llvm.org/viewvc/llvm-project?rev=313779&view=rev
Log:
Pacify gcc's -Wnum-compare after r313775

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineOperand.h

Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=313779&r1=313778&r2=313779&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Wed Sep 20 11:00:02 2017
@@ -817,8 +817,10 @@ template <> struct DenseMapInfo<MachineO
     return hash_value(MO);
   }
   static bool isEqual(const MachineOperand &LHS, const MachineOperand &RHS) {
-    if (LHS.getType() == MachineOperand::MO_Empty ||
-        LHS.getType() == MachineOperand::MO_Tombstone)
+    if (LHS.getType() == static_cast<MachineOperand::MachineOperandType>(
+                             MachineOperand::MO_Empty) ||
+        LHS.getType() == static_cast<MachineOperand::MachineOperandType>(
+                             MachineOperand::MO_Tombstone))
       return LHS.getType() == RHS.getType();
     return LHS.isIdenticalTo(RHS);
   }




More information about the llvm-commits mailing list