Skip to content

Commit

Permalink
[mlir][sparse] Silencing some -Wunused-function in unittests
Browse files Browse the repository at this point in the history
This is a followup to D128058.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D129027
  • Loading branch information
wrengr committed Jul 2, 2022
1 parent 8590a35 commit 537db49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
@@ -1,4 +1,5 @@
#include "mlir/Dialect/SparseTensor/Utils/Merger.h"
#include "llvm/Support/Compiler.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <memory>
Expand Down Expand Up @@ -103,7 +104,7 @@ static std::shared_ptr<Pattern> tensorPattern(unsigned tensorNum) {
}

#define IMPL_BINOP_PATTERN(OP, KIND) \
static std::shared_ptr<Pattern> OP##Pattern( \
LLVM_ATTRIBUTE_UNUSED static std::shared_ptr<Pattern> OP##Pattern( \
const std::shared_ptr<Pattern> &e0, \
const std::shared_ptr<Pattern> &e1) { \
return std::make_shared<Pattern>(KIND, e0, e1); \
Expand All @@ -128,7 +129,7 @@ class MergerTestBase : public ::testing::Test {
}

#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); \
}

Expand Down

0 comments on commit 537db49

Please sign in to comment.