[Mlir-commits] [mlir] 537db49 - [mlir][sparse] Silencing some -Wunused-function in unittests

wren romano llvmlistbot at llvm.org
Fri Jul 1 18:47:51 PDT 2022


Author: wren romano
Date: 2022-07-01T18:47:44-07:00
New Revision: 537db49596f65a05c0309cf3333fc44f1657e999

URL: https://github.com/llvm/llvm-project/commit/537db49596f65a05c0309cf3333fc44f1657e999
DIFF: https://github.com/llvm/llvm-project/commit/537db49596f65a05c0309cf3333fc44f1657e999.diff

LOG: [mlir][sparse] Silencing some -Wunused-function in unittests

This is a followup to D128058.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D129027

Added: 
    

Modified: 
    mlir/unittests/Dialect/SparseTensor/MergerTest.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp b/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
index b738bf337d85a..fad41b0178349 100644
--- a/mlir/unittests/Dialect/SparseTensor/MergerTest.cpp
+++ b/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>
@@ -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);                            \
@@ -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);                                        \
   }
 


        


More information about the Mlir-commits mailing list