[llvm-commits] [llvm] r119962 - /llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp

Duncan Sands baldrick at free.fr
Mon Nov 22 01:38:00 PST 2010


Author: baldrick
Date: Mon Nov 22 03:38:00 2010
New Revision: 119962

URL: http://llvm.org/viewvc/llvm-project?rev=119962&view=rev
Log:
Fix a compiler warning about Kind being used uninitialized
when assertions are disabled.

Modified:
    llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp?rev=119962&r1=119961&r2=119962&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMMCCodeEmitter.cpp Mon Nov 22 03:38:00 2010
@@ -408,13 +408,13 @@
              dyn_cast<MCSymbolRefExpr>(MO.getExpr())) {
     MCFixupKind Kind;
     switch (Expr->getKind()) {
+    default: assert(0 && "Unsupported ARMFixup");
     case MCSymbolRefExpr::VK_ARM_HI16:
       Kind = MCFixupKind(ARM::fixup_arm_movt_hi16);
       break;
     case MCSymbolRefExpr::VK_ARM_LO16:
       Kind = MCFixupKind(ARM::fixup_arm_movw_lo16);
       break;
-    default: assert(0 && "Unsupported ARMFixup"); break;
     }
     Fixups.push_back(MCFixup::Create(0, Expr, Kind));
     return 0;





More information about the llvm-commits mailing list