Add helper to get flattened tuple types
authorGeoffrey Martin-Noble <gcmn@google.com>
Thu, 18 Jul 2019 00:06:33 +0000 (17:06 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Fri, 19 Jul 2019 18:39:16 +0000 (11:39 -0700)
commitec66bc57a879189c9c3dfc82fcc62073e85f8fdd
tree5b11e3a6660d002a2333cc8b6a79b1792a5e4f98
parent68c409238e8e2bb6e57d6f6821228772d84d0810
Add helper to get flattened tuple types

The API on TupleType::getFlattenedTypes follows our normal conventions by accepting an output parameter, but requires callers to allocate their own storage and lends itself to use in an imperative style. This makes it difficult to use in tablegen. The current solution is to define a lambda that is immediately called, but it's cleaner to extract that into a helper.

PiperOrigin-RevId: 258672046
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/Support/TypeUtilities.h
mlir/lib/Support/TypeUtilities.cpp