diff options
| author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2020-01-03 16:31:24 -0500 |
|---|---|---|
| committer | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2020-01-03 16:31:33 -0500 |
| commit | e19188af0a2690f222db7d8b866be0afef7b3da0 (patch) | |
| tree | bf31071ba050e3c4f5ac7eb51578f03c98c5106b /mlir/tools | |
| parent | 0d9ca98c1a4676837e6e1f4ea9d9d1dea789b88c (diff) | |
| download | bcm5719-llvm-e19188af0a2690f222db7d8b866be0afef7b3da0.tar.gz bcm5719-llvm-e19188af0a2690f222db7d8b866be0afef7b3da0.zip | |
[mlir] Compilation fix: use LLVM_ATTRIBUTE_UNUSED following 6656e961c08393c3949412ef945ade0272b66fca
Differential Revision: https://reviews.llvm.org/D72124
Diffstat (limited to 'mlir/tools')
| -rw-r--r-- | mlir/tools/mlir-tblgen/RewriterGen.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mlir/tools/mlir-tblgen/RewriterGen.cpp b/mlir/tools/mlir-tblgen/RewriterGen.cpp index 1562562a20e..92c2c790147 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"; } |

