[Mlir-commits] [mlir] a88867a - [IR] Fix a warning

Kazu Hirata llvmlistbot at llvm.org
Thu Oct 28 09:38:35 PDT 2021


Author: Kazu Hirata
Date: 2021-10-28T09:38:25-07:00
New Revision: a88867a085e0f6cc93dfd291e1f3bdba3a5b4a97

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

LOG: [IR] Fix a warning

This patch fixes:

  mlir/lib/IR/BuiltinAttributes.cpp:876:39: error: unused function
  'isComplexOfIntType' [-Werror,-Wunused-function]

in a release build.

Added: 
    

Modified: 
    mlir/lib/IR/BuiltinAttributes.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/BuiltinAttributes.cpp b/mlir/lib/IR/BuiltinAttributes.cpp
index 9bb90a035e34..fe8f6a54d82f 100644
--- a/mlir/lib/IR/BuiltinAttributes.cpp
+++ b/mlir/lib/IR/BuiltinAttributes.cpp
@@ -873,7 +873,7 @@ bool DenseElementsAttr::isSplat() const {
 }
 
 /// Return if the given complex type has an integer element type.
-static bool isComplexOfIntType(Type type) {
+LLVM_ATTRIBUTE_UNUSED static bool isComplexOfIntType(Type type) {
   return type.cast<ComplexType>().getElementType().isa<IntegerType>();
 }
 


        


More information about the Mlir-commits mailing list