[llvm-commits] [llvm] r52146 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp

Dan Gohman gohman at apple.com
Mon Jun 9 07:09:13 PDT 2008


Author: djg
Date: Mon Jun  9 09:09:13 2008
New Revision: 52146

URL: http://llvm.org/viewvc/llvm-project?rev=52146&view=rev
Log:
Abort on an unrecognized opcode.

Modified:
    llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp

Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=52146&r1=52145&r2=52146&view=diff

==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Mon Jun  9 09:09:13 2008
@@ -1065,6 +1065,10 @@
     }
 
     switch (I->getOpcode()) {
+    default:
+      error("Invalid instruction");
+      break;
+
     case Instruction::Ret: {
       const ReturnInst* ret =  cast<ReturnInst>(I);
       Out << "ReturnInst::Create("





More information about the llvm-commits mailing list