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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 13:37:06 PST 2018


Might be nice to have a test case for this as well?

On Wed, Nov 28, 2018 at 4:35 AM Haojian Wu via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181203/99fe0c36/attachment.html>


More information about the llvm-commits mailing list