Explicitly request unsigned enum types when desired
authorReid Kleckner <reid@kleckner.net>
Tue, 8 Oct 2013 20:15:11 +0000 (20:15 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 8 Oct 2013 20:15:11 +0000 (20:15 +0000)
This fixes repeated -Wmicrosoft warnings when self-hosting clang on
Windows, and gets us real unsigned enum types with MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192227 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/ScheduleDAG.h
lib/CodeGen/RegAllocFast.cpp
lib/CodeGen/RegAllocGreedy.cpp

index 371ac6c34d08999f205ea9d5fde2bd43fadff75e..ccba1b0364e44895fb17fb0fc58a1480eed3a9b4 100644 (file)
@@ -248,7 +248,7 @@ namespace llvm {
   /// SUnit - Scheduling unit. This is a node in the scheduling DAG.
   class SUnit {
   private:
-    enum { BoundaryID = ~0u };
+    enum LLVM_ENUM_INT_TYPE(unsigned) { BoundaryID = ~0u };
 
     SDNode *Node;                       // Representative node.
     MachineInstr *Instr;                // Alternatively, a MachineInstr.
index 6c2e60b5c6e18b2d0ac7fc2b51a4fbdab8f40081..e92dbd2626a88c1336222949f6b24d639c8b6655 100644 (file)
@@ -144,7 +144,7 @@ namespace {
     // not be erased.
     bool isBulkSpilling;
 
-    enum {
+    enum LLVM_ENUM_INT_TYPE(unsigned) {
       spillClean = 1,
       spillDirty = 100,
       spillImpossible = ~0u
index f094c4ca3f4a23712751a6d68086ea70053b62f6..3fa52432209f7b5c3f19f6ca84749413f5c4bf37 100644 (file)
@@ -222,7 +222,7 @@ class RAGreedy : public MachineFunctionPass,
   /// class.
   SmallVector<GlobalSplitCandidate, 32> GlobalCand;
 
-  enum { NoCand = ~0u };
+  enum LLVM_ENUM_INT_TYPE(unsigned) { NoCand = ~0u };
 
   /// Candidate map. Each edge bundle is assigned to a GlobalCand entry, or to
   /// NoCand which indicates the stack interval.