[PATCH] D78774: Add constructor to ShapedTypeComponents for unranked with element type.

Stella Laurenzo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 16:53:00 PDT 2020


stellaraccident created this revision.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78774

Files:
  mlir/include/mlir/Interfaces/InferTypeOpInterface.h


Index: mlir/include/mlir/Interfaces/InferTypeOpInterface.h
===================================================================
--- mlir/include/mlir/Interfaces/InferTypeOpInterface.h
+++ mlir/include/mlir/Interfaces/InferTypeOpInterface.h
@@ -38,7 +38,8 @@
 public:
   /// Default construction is an unranked shape.
   ShapedTypeComponents() : ranked(false), elementType(nullptr), attr(nullptr){};
-
+  ShapedTypeComponents(Type elementType)
+      : ranked(false), elementType(elementType), attr(nullptr) {}
   template <typename Arg, typename = typename std::enable_if_t<
                               std::is_constructible<ShapeStorageT, Arg>::value>>
   ShapedTypeComponents(Arg &&arg, Type elementType = nullptr,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78774.259758.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200423/19f7cbc9/attachment.bin>


More information about the llvm-commits mailing list