Use a sized enum for MachineOperandType. No functionality change
authorPete Cooper <peter_cooper@apple.com>
Fri, 16 May 2014 23:28:17 +0000 (23:28 +0000)
committerPete Cooper <peter_cooper@apple.com>
Fri, 16 May 2014 23:28:17 +0000 (23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209048 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineOperand.h
lib/Target/PowerPC/PPCAsmPrinter.cpp

index 39fa411b3c9f2bf0230960b9e8656440ec46dbc0..2eb18c4554e32afff6d64d974a563d402c064c43 100644 (file)
@@ -42,7 +42,7 @@ class MCSymbol;
 ///
 class MachineOperand {
 public:
-  enum MachineOperandType {
+  enum MachineOperandType : unsigned char {
     MO_Register,          ///< Register operand.
     MO_Immediate,         ///< Immediate operand
     MO_CImmediate,        ///< Immediate >64bit operand
@@ -65,7 +65,7 @@ public:
 private:
   /// OpKind - Specify what kind of operand this is.  This discriminates the
   /// union.
-  unsigned char OpKind; // MachineOperandType
+  MachineOperandType OpKind;
 
   /// Subregister number for MO_Register.  A value of 0 indicates the
   /// MO_Register has no subReg.
index ac5c7f0c9bb84daedc8a94ceed66646b30e29e2f..2174b18715f12efdb0583e06b70df1d87b38c4af 100644 (file)
@@ -208,7 +208,7 @@ void PPCAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
   }
 
   default:
-    O << "<unknown operand type: " << MO.getType() << ">";
+    O << "<unknown operand type: " << (unsigned)MO.getType() << ">";
     return;
   }
 }