From e19188af0a2690f222db7d8b866be0afef7b3da0 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea Date: Fri, 3 Jan 2020 16:31:24 -0500 Subject: [PATCH] [mlir] Compilation fix: use LLVM_ATTRIBUTE_UNUSED following 6656e961c08393c3949412ef945ade0272b66fca Differential Revision: https://reviews.llvm.org/D72124 --- mlir/tools/mlir-tblgen/RewriterGen.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp index 1562562..92c2c79 100644 --- a/mlir/tools/mlir-tblgen/RewriterGen.cpp +++ b/mlir/tools/mlir-tblgen/RewriterGen.cpp @@ -1028,12 +1028,8 @@ static void emitRewriters(const RecordKeeper &recordKeeper, raw_ostream &os) { } // Emit function to add the generated matchers to the pattern list. - os << "void\n"; - os << "#if !defined(_MSC_VER) || defined(__clang__)\n"; - os << "__attribute__((unused))\n"; - os << "#endif\n"; - os << "populateWithGenerated(MLIRContext *context, " - << "OwningRewritePatternList *patterns) {\n"; + os << "void LLVM_ATTRIBUTE_UNUSED populateWithGenerated(MLIRContext " + "*context, OwningRewritePatternList *patterns) {\n"; for (const auto &name : rewriterNames) { os << " patterns->insert<" << name << ">(context);\n"; } -- 2.7.4