Abort on an unrecognized opcode.
authorDan Gohman <gohman@apple.com>
Mon, 9 Jun 2008 14:09:13 +0000 (14:09 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 9 Jun 2008 14:09:13 +0000 (14:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52146 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CppBackend/CPPBackend.cpp

index 22dd3058de0a3bdc70110bf75f6b7a395584e7bc..8b450304d47479fe776ea82e7342b0e21fee6bb1 100644 (file)
@@ -1065,6 +1065,10 @@ namespace {
     }
 
     switch (I->getOpcode()) {
+    default:
+      error("Invalid instruction");
+      break;
+
     case Instruction::Ret: {
       const ReturnInst* ret =  cast<ReturnInst>(I);
       Out << "ReturnInst::Create("