[Mlir-commits] [mlir] 16ed79d - [mlir] tosa: build error when building with clang

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Mar 28 13:02:19 PDT 2022


Author: lipracer
Date: 2022-03-28T20:02:15Z
New Revision: 16ed79d569524a5ed59a20ba54089d744e851ea0

URL: https://github.com/llvm/llvm-project/commit/16ed79d569524a5ed59a20ba54089d744e851ea0
DIFF: https://github.com/llvm/llvm-project/commit/16ed79d569524a5ed59a20ba54089d744e851ea0.diff

LOG: [mlir] tosa: build error when building with clang

The change of https://reviews.llvm.org/D121513#3411651
has caused a build error when building with clang:

/mnt/vss/_work/1/llvm-project/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp:599:26: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
ReduceFolder(ReduceAllOp);

Reviewed By: hpmorgan, Mogball

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

Added: 
    

Modified: 
    mlir/lib/Dialect/Tosa/IR/TosaOps.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index 5fdd8b46835b6..6864ecc72fb08 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -571,7 +571,7 @@ OpFoldResult ConstOp::fold(ArrayRef<Attribute> operands) {
   return valueAttr();
 }
 
-#define ReduceFolder(OP)                                                       \
+#define REDUCE_FOLDER(OP)                                                      \
   OpFoldResult OP::fold(ArrayRef<Attribute> operands) {                        \
     ShapedType inputTy = input().getType().cast<ShapedType>();                 \
     if (!inputTy.hasRank())                                                    \
@@ -581,13 +581,13 @@ OpFoldResult ConstOp::fold(ArrayRef<Attribute> operands) {
     return {};                                                                 \
   }
 
-ReduceFolder(ReduceAllOp);
-ReduceFolder(ReduceAnyOp);
-ReduceFolder(ReduceMaxOp);
-ReduceFolder(ReduceMinOp);
-ReduceFolder(ReduceProdOp);
-ReduceFolder(ReduceSumOp);
-#undef ReduceFolder
+REDUCE_FOLDER(ReduceAllOp)
+REDUCE_FOLDER(ReduceAnyOp)
+REDUCE_FOLDER(ReduceMaxOp)
+REDUCE_FOLDER(ReduceMinOp)
+REDUCE_FOLDER(ReduceProdOp)
+REDUCE_FOLDER(ReduceSumOp)
+#undef REDUCE_FOLDER
 
 OpFoldResult ReshapeOp::fold(ArrayRef<Attribute> operands) {
   auto inputTy = input1().getType().dyn_cast<RankedTensorType>();


        


More information about the Mlir-commits mailing list