[llvm-commits] [llvm] r148495 - /llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp

Benjamin Kramer benny.kra at googlemail.com
Thu Jan 19 13:11:14 PST 2012


Author: d0k
Date: Thu Jan 19 15:11:13 2012
New Revision: 148495

URL: http://llvm.org/viewvc/llvm-project?rev=148495&view=rev
Log:
Silence warnings about mixing enums.

Modified:
    llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp

Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp?rev=148495&r1=148494&r2=148495&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp Thu Jan 19 15:11:13 2012
@@ -168,8 +168,7 @@
                                          uint64_t Value,
                                          const MCInstFragment *DF,
                                          const MCAsmLayout &Layout) const {
-  switch (Fixup.getKind()) {
-  default: assert(0 && "Unexpected fixup kind in fixupNeedsRelaxation()!");
+  switch ((unsigned)Fixup.getKind()) {
   case ARM::fixup_arm_thumb_bcc: {
     // Relaxing tBcc to t2Bcc. tBcc has a signed 9-bit displacement with the
     // low bit being an implied zero. There's an implied +4 offset for the
@@ -188,7 +187,7 @@
     return Offset > 1020 || Offset < 0 || Offset & 3;
   }
   }
-  llvm_unreachable("Invalid switch/cash!?");
+  llvm_unreachable("Unexpected fixup kind in fixupNeedsRelaxation()!");
 }
 
 void ARMAsmBackend::relaxInstruction(const MCInst &Inst, MCInst &Res) const {





More information about the llvm-commits mailing list