From 26825a84e97790adaffc55c6101b9fe2524fe1b7 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 9 Jun 2008 14:09:13 +0000 Subject: [PATCH] Abort on an unrecognized opcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52146 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/CppBackend/CPPBackend.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 22dd3058de0..8b450304d47 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -1065,6 +1065,10 @@ namespace { } switch (I->getOpcode()) { + default: + error("Invalid instruction"); + break; + case Instruction::Ret: { const ReturnInst* ret = cast(I); Out << "ReturnInst::Create("