From 53509663007562817851147d0ec572799434fc9b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 5 Feb 2025 09:34:38 -0800 Subject: [PATCH] [TableGen] Add declarations to silence gcc warning. NFC Add declarations of SDTypeConstraint's operator== and operator< to the llvm namespace. These are declared as friends inside the class which makes them part of the enclosing namespace, but gcc wants it to be more explicit. Fixes #125537. --- llvm/utils/TableGen/Common/CodeGenDAGPatterns.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h index 6a6f1a6ac437c..328700cd0d163 100644 --- a/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h +++ b/llvm/utils/TableGen/Common/CodeGenDAGPatterns.h @@ -393,6 +393,9 @@ struct SDTypeConstraint { const SDTypeConstraint &RHS); }; +bool operator==(const SDTypeConstraint &LHS, const SDTypeConstraint &RHS); +bool operator<(const SDTypeConstraint &LHS, const SDTypeConstraint &RHS); + /// ScopedName - A name of a node associated with a "scope" that indicates /// the context (e.g. instance of Pattern or PatFrag) in which the name was /// used. This enables substitution of pattern fragments while keeping track