From: Pete Cooper Date: Mon, 1 Dec 2014 18:46:43 +0000 (+0000) Subject: Use C++ typed enums instead of 'unsigned char' for MCInst Kind. NFC. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=fcf3609fd7f95dc67c93ee13987943c23dc66ce8;p=oota-llvm.git 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 --- diff --git a/include/llvm/MC/MCInst.h b/include/llvm/MC/MCInst.h index 751d61563d2..25cd5ccb08f 100644 --- a/include/llvm/MC/MCInst.h +++ b/include/llvm/MC/MCInst.h @@ -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;