]> granicus.if.org Git - llvm/commit
[TableGen] Add "getOperandType" to get operand types from opcode/opidx
authorJustin Bogner <mail@justinbogner.com>
Tue, 16 Jul 2019 22:10:16 +0000 (22:10 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 16 Jul 2019 22:10:16 +0000 (22:10 +0000)
commit8a6db15ff251a73f47ebf135010b5da90f352aa7
tree4b81be1f9ce64c666ce00528b64e9d3c27df54ce
parentb261aae2976dc0fc307cd00e2456d0249d73a091
[TableGen] Add "getOperandType" to get operand types from opcode/opidx

The InstrInfoEmitter outputs an enum called "OperandType" which gives
numerical IDs to each operand type. This patch makes use of this enum
to define a function called "getOperandType", which allows looking up
the type of an operand given its opcode and operand index.

Patch by Nicolas Guillemot. Thanks!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366274 91177308-0d34-0410-b5e6-96231b3b80d8
test/TableGen/get-operand-type.td [new file with mode: 0644]
utils/TableGen/InstrInfoEmitter.cpp