Use C++ typed enums instead of 'unsigned char' for MCInst Kind. NFC.

This makes it much easier to see the value of operands in the debugger.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pete Cooper
2014-12-01 18:46:43 +00:00
parent eb1f2e8eb0
commit fcf3609fd7

View File

@@ -31,7 +31,7 @@ class MCInst;
/// MCOperand - Instances of this class represent operands of the MCInst class. /// MCOperand - Instances of this class represent operands of the MCInst class.
/// This is a simple discriminated union. /// This is a simple discriminated union.
class MCOperand { class MCOperand {
enum MachineOperandType { enum MachineOperandType : unsigned char {
kInvalid, ///< Uninitialized. kInvalid, ///< Uninitialized.
kRegister, ///< Register operand. kRegister, ///< Register operand.
kImmediate, ///< Immediate operand. kImmediate, ///< Immediate operand.
@@ -39,7 +39,7 @@ class MCOperand {
kExpr, ///< Relocatable immediate operand. kExpr, ///< Relocatable immediate operand.
kInst ///< Sub-instruction operand. kInst ///< Sub-instruction operand.
}; };
unsigned char Kind; MachineOperandType Kind;
union { union {
unsigned RegVal; unsigned RegVal;