aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/algorithm.cpp
diff options
context:
space:
mode:
authorMarkus Böck <markus.bock+llvm@nextsilicon.com>2023-08-10 09:56:59 +0200
committerMarkus Böck <markus.bock+llvm@nextsilicon.com>2023-08-10 12:38:54 +0200
commitf3b1361f35fcbd2b551f224bebc4068d7de8c3d2 (patch)
tree8e2ea24d94d2312a97b1aa98064390a121f59e47 /libcxx/src/algorithm.cpp
parent5b29f86b42bab223ed8b9f2738802138aade74e0 (diff)
downloadllvm-f3b1361f35fcbd2b551f224bebc4068d7de8c3d2.zip
llvm-f3b1361f35fcbd2b551f224bebc4068d7de8c3d2.tar.gz
llvm-f3b1361f35fcbd2b551f224bebc4068d7de8c3d2.tar.bz2
[mlir] Generate constructor in generic adaptors allowing construction from an op instance
In essentially all occurrences of adaptor constructions in the codebase, an instance of the op is available and only a different value range is being used. Nevertheless, one had to perform the ritual of calling and pass `getAttrDictionary()`, `getProperties` and `getRegions` manually. This patch changes that by teaching TableGen to generate a new constructor in the adaptor that is constructable using `GenericAdaptor(valueRange, op)`. The (discardable) attr dictionary, properties and the regions are then taken directly from the passed op, with only the value range being taken from the first parameter. This simplifies a lot of code and also guarantees that all the various getters of the adaptor work in all scenarios. Differential Revision: https://reviews.llvm.org/D157516
Diffstat (limited to 'libcxx/src/algorithm.cpp')
0 files changed, 0 insertions, 0 deletions