[PATCH] D72124: [mlir] Compilation fix: use LLVM_ATTRIBUTE_UNUSED following 6656e961c08393c3949412ef945ade0272b66fca
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 2 18:44:08 PST 2020
aganea created this revision.
aganea added a reviewer: echristo.
Herald added subscribers: llvm-commits, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
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
@@ -1020,12 +1020,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.235986.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200103/4c5eaa32/attachment.bin>
More information about the llvm-commits
mailing list