diff --git a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp --- a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp +++ b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp @@ -1,6 +1,7 @@ #include "mlir/Dialect/SparseTensor/Utils/Merger.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "llvm/Support/Compiler.h" #include using namespace mlir; @@ -103,7 +104,7 @@ } #define IMPL_BINOP_PATTERN(OP, KIND) \ - static std::shared_ptr OP##Pattern( \ + LLVM_ATTRIBUTE_UNUSED static std::shared_ptr OP##Pattern( \ const std::shared_ptr &e0, \ const std::shared_ptr &e1) { \ return std::make_shared(KIND, e0, e1); \ @@ -128,7 +129,7 @@ } #define IMPL_BINOP_EXPR(OP, KIND) \ - unsigned OP##Expr(unsigned e0, unsigned e1) { \ + LLVM_ATTRIBUTE_UNUSED unsigned OP##Expr(unsigned e0, unsigned e1) \ return merger.addExp(KIND, e0, e1); \ }