[PATCH] D72124: [mlir] Compilation fix: use LLVM_ATTRIBUTE_UNUSED following 6656e961c08393c3949412ef945ade0272b66fca

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 13:32:01 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe19188af0a26: [mlir] Compilation fix: use LLVM_ATTRIBUTE_UNUSED following… (authored by aganea).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72124/new/

https://reviews.llvm.org/D72124

Files:
  mlir/tools/mlir-tblgen/RewriterGen.cpp


Index: mlir/tools/mlir-tblgen/RewriterGen.cpp
===================================================================
--- mlir/tools/mlir-tblgen/RewriterGen.cpp
+++ mlir/tools/mlir-tblgen/RewriterGen.cpp
@@ -1028,12 +1028,8 @@
   }
 
   // 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";
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72124.236122.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200103/cce1fb06/attachment.bin>


More information about the llvm-commits mailing list