[llvm-commits] [llvm] r149860 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/MachineFunction.cpp

Craig Topper craig.topper at gmail.com
Mon Feb 6 00:17:44 PST 2012


Author: ctopper
Date: Mon Feb  6 02:17:43 2012
New Revision: 149860

URL: http://llvm.org/viewvc/llvm-project?rev=149860&view=rev
Log:
Move some llvm_unreachable's from r149849 out of switch statements to satisfy -Wcovered-switch-default

Modified:
    llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
    llvm/trunk/lib/CodeGen/MachineFunction.cpp

Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=149860&r1=149859&r2=149860&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon Feb  6 02:17:43 2012
@@ -128,8 +128,8 @@
                  Other.Contents.Order.isNormalMemory &&
                Contents.Order.isMustAlias == Other.Contents.Order.isMustAlias &&
                Contents.Order.isArtificial == Other.Contents.Order.isArtificial;
-      default: llvm_unreachable("Invalid dependency kind!");
       }
+      llvm_unreachable("Invalid dependency kind!");
     }
 
     bool operator!=(const SDep &Other) const {

Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=149860&r1=149859&r2=149860&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Mon Feb  6 02:17:43 2012
@@ -528,7 +528,6 @@
   // The size of a jump table entry is 4 bytes unless the entry is just the
   // address of a block, in which case it is the pointer size.
   switch (getEntryKind()) {
-  default: llvm_unreachable("Unknown jump table encoding!");
   case MachineJumpTableInfo::EK_BlockAddress:
     return TD.getPointerSize();
   case MachineJumpTableInfo::EK_GPRel64BlockAddress:
@@ -540,6 +539,7 @@
   case MachineJumpTableInfo::EK_Inline:
     return 0;
   }
+  llvm_unreachable("Unknown jump table encoding!");
 }
 
 /// getEntryAlignment - Return the alignment of each entry in the jump table.
@@ -548,7 +548,6 @@
   // entry is just the address of a block, in which case it is the pointer
   // alignment.
   switch (getEntryKind()) {
-  default: llvm_unreachable("Unknown jump table encoding!");
   case MachineJumpTableInfo::EK_BlockAddress:
     return TD.getPointerABIAlignment();
   case MachineJumpTableInfo::EK_GPRel64BlockAddress:
@@ -560,6 +559,7 @@
   case MachineJumpTableInfo::EK_Inline:
     return 1;
   }
+  llvm_unreachable("Unknown jump table encoding!");
 }
 
 /// createJumpTableIndex - Create a new jump table entry in the jump table info.





More information about the llvm-commits mailing list