[llvm] r347749 - Fix -Winfinite-recursion compile error.

Haojian Wu via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 28 04:32:53 PST 2018


Author: hokein
Date: Wed Nov 28 04:32:53 2018
New Revision: 347749

URL: http://llvm.org/viewvc/llvm-project?rev=347749&view=rev
Log:
Fix -Winfinite-recursion compile error.

Modified:
    llvm/trunk/utils/TableGen/CodeGenInstruction.h

Modified: llvm/trunk/utils/TableGen/CodeGenInstruction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenInstruction.h?rev=347749&r1=347748&r2=347749&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenInstruction.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenInstruction.h Wed Nov 28 04:32:53 2018
@@ -65,7 +65,9 @@ template <typename T> class ArrayRef;
           return false;
         return true;
       }
-      bool operator!=(const ConstraintInfo &RHS) const { return *this != RHS; }
+      bool operator!=(const ConstraintInfo &RHS) const {
+        return !(*this == RHS);
+      }
     };
 
     /// OperandInfo - The information we keep track of for each operand in the




More information about the llvm-commits mailing list