Fix some minor MSVC compiler warnings.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 19 Jul 2009 01:38:38 +0000 (01:38 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 19 Jul 2009 01:38:38 +0000 (01:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76356 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/Spiller.h
lib/Target/X86/X86Subtarget.cpp

index 85ade6fc71503c4f629534dfcc7f1bc66cdb87d7..87ca13e2860d8cc5fc20dfe698cd98e73bf2fe7d 100644 (file)
@@ -3905,11 +3905,11 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, SDVTList VTList,
   if (VTList.NumVTs == 1)
     return getNode(Opcode, DL, VTList.VTs[0], Ops, NumOps);
 
+#if 0
   switch (Opcode) {
   // FIXME: figure out how to safely handle things like
   // int foo(int x) { return 1 << (x & 255); }
   // int bar() { return foo(256); }
-#if 0
   case ISD::SRA_PARTS:
   case ISD::SRL_PARTS:
   case ISD::SHL_PARTS:
@@ -3925,8 +3925,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL, SDVTList VTList,
           return getNode(Opcode, DL, VT, N1, N2, N3.getOperand(0));
       }
     break;
-#endif
   }
+#endif
 
   // Memoize the node unless it returns a flag.
   SDNode *N;
index f339336f61cd3756d6af1f305af366eaaa9ef827..9c3900df0b57b2f555548403f2b75c4644beae22 100644 (file)
@@ -14,7 +14,7 @@
 
 namespace llvm {
 
-  struct LiveInterval;
+  class LiveInterval;
   class LiveIntervals;
   class LiveStacks;
   class MachineFunction;
index 678139addc2b4dc2eb535dd8d3be55723510cc96..733f02ff06925924f486c5bf195ddc6eee278bb8 100644 (file)
@@ -365,9 +365,7 @@ static const char *GetCurrentX86CPU() {
         }
       case 15:
         if (HasSSE3) {
-          switch (Model) {
-          default: return "k8-sse3";
-          }
+          return "k8-sse3";
         } else {
           switch (Model) {
           case 1:  return "opteron";
@@ -376,9 +374,7 @@ static const char *GetCurrentX86CPU() {
           }
         }
       case 16:
-        switch (Model) {
-        default: return "amdfam10";
-        }
+        return "amdfam10";
     default:
       return "generic";
     }