[Mlir-commits] [mlir] 035a6b9 - Fix a few warnings from GCC (NFC)

Mehdi Amini llvmlistbot at llvm.org
Fri Oct 23 17:36:10 PDT 2020


Author: Mehdi Amini
Date: 2020-10-24T00:35:55Z
New Revision: 035a6b95c3125e1b044d1b43f819fac93a56dc5c

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

LOG: Fix a few warnings from GCC (NFC)

Added: 
    

Modified: 
    mlir/include/mlir/CAPI/IR.h
    mlir/lib/TableGen/TypeDef.cpp
    mlir/lib/Transforms/Bufferize.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/CAPI/IR.h b/mlir/include/mlir/CAPI/IR.h
index b3e481dfb665..c7509d91671c 100644
--- a/mlir/include/mlir/CAPI/IR.h
+++ b/mlir/include/mlir/CAPI/IR.h
@@ -24,7 +24,7 @@ DEFINE_C_API_PTR_METHODS(MlirContext, mlir::MLIRContext)
 DEFINE_C_API_PTR_METHODS(MlirDialect, mlir::Dialect)
 DEFINE_C_API_PTR_METHODS(MlirOperation, mlir::Operation)
 DEFINE_C_API_PTR_METHODS(MlirBlock, mlir::Block)
-DEFINE_C_API_PTR_METHODS(MlirOpPrintingFlags, mlir::OpPrintingFlags);
+DEFINE_C_API_PTR_METHODS(MlirOpPrintingFlags, mlir::OpPrintingFlags)
 DEFINE_C_API_PTR_METHODS(MlirRegion, mlir::Region)
 
 DEFINE_C_API_METHODS(MlirAttribute, mlir::Attribute)

diff  --git a/mlir/lib/TableGen/TypeDef.cpp b/mlir/lib/TableGen/TypeDef.cpp
index e5327fcbe08a..86373a481239 100644
--- a/mlir/lib/TableGen/TypeDef.cpp
+++ b/mlir/lib/TableGen/TypeDef.cpp
@@ -107,7 +107,7 @@ StringRef TypeParameter::getName() const {
 }
 llvm::Optional<StringRef> TypeParameter::getAllocator() const {
   llvm::Init *parameterType = def->getArg(num);
-  if (auto *stringType = dyn_cast<llvm::StringInit>(parameterType))
+  if (isa<llvm::StringInit>(parameterType))
     return llvm::Optional<StringRef>();
 
   if (auto *typeParameter = dyn_cast<llvm::DefInit>(parameterType)) {

diff  --git a/mlir/lib/Transforms/Bufferize.cpp b/mlir/lib/Transforms/Bufferize.cpp
index 26eabe2b8947..dbfe990676de 100644
--- a/mlir/lib/Transforms/Bufferize.cpp
+++ b/mlir/lib/Transforms/Bufferize.cpp
@@ -74,7 +74,7 @@ BufferizeTypeConverter::getResultConversionKind(Type origin, Type converted) {
 
 void mlir::populateBufferizeMaterializationLegality(ConversionTarget &target) {
   target.addLegalOp<TensorLoadOp, TensorToMemrefOp>();
-};
+}
 
 //===----------------------------------------------------------------------===//
 // BufferizeFuncOpConverter


        


More information about the Mlir-commits mailing list