aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-09 14:09:13 +0000
committerDan Gohman <gohman@apple.com>2008-06-09 14:09:13 +0000
commit26825a84e97790adaffc55c6101b9fe2524fe1b7 (patch)
treef38cb6de19e545fa07daa345b11f61576dfb1d8b
parente8e3b5585a6a587efeaac306fe966f7d6859d982 (diff)
downloadexternal_llvm-26825a84e97790adaffc55c6101b9fe2524fe1b7.zip
external_llvm-26825a84e97790adaffc55c6101b9fe2524fe1b7.tar.gz
external_llvm-26825a84e97790adaffc55c6101b9fe2524fe1b7.tar.bz2
Abort on an unrecognized opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52146 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/CppBackend/CPPBackend.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp
index 22dd305..8b45030 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<ReturnInst>(I);
Out << "ReturnInst::Create("