OSDN Git Service

Pacify gcc's -Wnum-compare after r313775
authorHans Wennborg <hans@hanshq.net>
Wed, 20 Sep 2017 18:00:02 +0000 (18:00 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 20 Sep 2017 18:00:02 +0000 (18:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313779 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineOperand.h

index 1878cd9..6693ed2 100644 (file)
@@ -817,8 +817,10 @@ template <> struct DenseMapInfo<MachineOperand> {
     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);
   }