Use C++ typed enums instead of 'unsigned char' for MCInst Kind. NFC.
authorPete Cooper <peter_cooper@apple.com>
Mon, 1 Dec 2014 18:46:43 +0000 (18:46 +0000)
committerPete Cooper <peter_cooper@apple.com>
Mon, 1 Dec 2014 18:46:43 +0000 (18:46 +0000)
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

include/llvm/MC/MCInst.h

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