diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-07-14 21:47:18 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-07-14 21:47:18 +0000 |
commit | 5196c12e9fdec9ef3c63d96cb529c1c1cb732773 (patch) | |
tree | 78d2c0a828c34d649e022fc51e5af3a8ce29bd8d /utils/TableGen/InstrInfoEmitter.cpp | |
parent | 70d8fcfaa04eb20541b006a8fb97cbc1d3033cc4 (diff) | |
download | external_llvm-5196c12e9fdec9ef3c63d96cb529c1c1cb732773.zip external_llvm-5196c12e9fdec9ef3c63d96cb529c1c1cb732773.tar.gz external_llvm-5196c12e9fdec9ef3c63d96cb529c1c1cb732773.tar.bz2 |
Add a new field to MCOperandInfo that contains information about the type of the Operand.
- The actual values are from the MCOI::OperandType enum.
- Teach tblgen to read it from the instruction definition.
- This is a better implementation of the hacks in edis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/InstrInfoEmitter.cpp')
-rw-r--r-- | utils/TableGen/InstrInfoEmitter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp index b27e497..d3c2d63 100644 --- a/utils/TableGen/InstrInfoEmitter.cpp +++ b/utils/TableGen/InstrInfoEmitter.cpp @@ -121,6 +121,11 @@ InstrInfoEmitter::GetOperandInfo(const CodeGenInstruction &Inst) { " << 16) | (1 << MCOI::TIED_TO))"; } + // Fill in operand type. + Res += ", MCOI::"; + assert(!Inst.Operands[i].OperandType.empty() && "Invalid operand type."); + Res += Inst.Operands[i].OperandType; + Result.push_back(Res); } } |