[Mlir-commits] [mlir] eb8c72c - [MLIR][NFC] Add FuncOp::getArgumentTypes()

Rahul Joshi llvmlistbot at llvm.org
Fri Jul 31 13:18:26 PDT 2020


Author: Rahul Joshi
Date: 2020-07-31T13:18:03-07:00
New Revision: eb8c72cb0d8949114350d2f24a1741898b63dae5

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

LOG: [MLIR][NFC] Add FuncOp::getArgumentTypes()

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

Added: 
    

Modified: 
    mlir/include/mlir/IR/FunctionSupport.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/FunctionSupport.h b/mlir/include/mlir/IR/FunctionSupport.h
index b358215ca962..7e281f393af9 100644
--- a/mlir/include/mlir/IR/FunctionSupport.h
+++ b/mlir/include/mlir/IR/FunctionSupport.h
@@ -206,6 +206,7 @@ class FunctionLike : public OpTrait::TraitBase<ConcreteType, FunctionLike> {
   //===--------------------------------------------------------------------===//
   // Argument Handling
   //===--------------------------------------------------------------------===//
+  using BlockArgListType = Region::BlockArgListType;
 
   unsigned getNumArguments() {
     return static_cast<ConcreteType *>(this)->getNumFuncArguments();
@@ -224,6 +225,10 @@ class FunctionLike : public OpTrait::TraitBase<ConcreteType, FunctionLike> {
   args_iterator args_end() { return getBody().args_end(); }
   Block::BlockArgListType getArguments() { return getBody().getArguments(); }
 
+  ValueTypeRange<BlockArgListType> getArgumentTypes() {
+    return getBody().getArgumentTypes();
+  }
+
   //===--------------------------------------------------------------------===//
   // Argument Attributes
   //===--------------------------------------------------------------------===//


        


More information about the Mlir-commits mailing list