[llvm] r223060 - Use C++ typed enums instead of 'unsigned char' for MCInst Kind. NFC.
Pete Cooper
peter_cooper at apple.com
Mon Dec 1 10:46:43 PST 2014
Author: pete
Date: Mon Dec 1 12:46:43 2014
New Revision: 223060
URL: http://llvm.org/viewvc/llvm-project?rev=223060&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/MC/MCInst.h
Modified: llvm/trunk/include/llvm/MC/MCInst.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCInst.h?rev=223060&r1=223059&r2=223060&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCInst.h (original)
+++ llvm/trunk/include/llvm/MC/MCInst.h Mon Dec 1 12:46:43 2014
@@ -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;
More information about the llvm-commits
mailing list