[Mlir-commits] [mlir] 4022152 - Use LLVM_ATTRIBUTE_UNUSED to silent warning for static function used in assert only (NFC)

Mehdi Amini llvmlistbot at llvm.org
Fri Dec 3 20:23:44 PST 2021


Author: Mehdi Amini
Date: 2021-12-04T04:23:21Z
New Revision: 4022152b3592a8174ebf6f58f57724e43e5ebefc

URL: https://github.com/llvm/llvm-project/commit/4022152b3592a8174ebf6f58f57724e43e5ebefc
DIFF: https://github.com/llvm/llvm-project/commit/4022152b3592a8174ebf6f58f57724e43e5ebefc.diff

LOG: Use LLVM_ATTRIBUTE_UNUSED to silent warning for static function used in assert only (NFC)

Added: 
    

Modified: 
    mlir/lib/IR/MLIRContext.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp
index 9ccdd97d6fe7d..670faf1aa930f 100644
--- a/mlir/lib/IR/MLIRContext.cpp
+++ b/mlir/lib/IR/MLIRContext.cpp
@@ -911,9 +911,9 @@ AffineMap AffineMap::getImpl(unsigned dimCount, unsigned symbolCount,
 /// present in result expressions is less than `dimCount` and the highest index
 /// of symbolic identifier present in result expressions is less than
 /// `symbolCount`.
-LLVM_NODISCARD static bool willBeValidAffineMap(unsigned dimCount,
-                                                unsigned symbolCount,
-                                                ArrayRef<AffineExpr> results) {
+LLVM_ATTRIBUTE_UNUSED static bool
+willBeValidAffineMap(unsigned dimCount, unsigned symbolCount,
+                     ArrayRef<AffineExpr> results) {
   int64_t maxDimPosition = -1;
   int64_t maxSymbolPosition = -1;
   getMaxDimAndSymbol(ArrayRef<ArrayRef<AffineExpr>>(results), maxDimPosition,


        


More information about the Mlir-commits mailing list