From 2a4fe8b344063cdf8b29c77e589f49c56aaf9ea4 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 4 Apr 2012 04:55:46 +0000 Subject: [PATCH] Convert assert(false) followed by a return to llvm_unreachable llvm-svn: 153997 --- utils/TableGen/AsmWriterEmitter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index 8fdbe89811e..e0b0aace33e 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -669,8 +669,7 @@ static void EmitGetMapOperandNumber(raw_ostream &O) { O << " I = OpMap.begin(), E = OpMap.end(); I != E; ++I)\n"; O << " if (I->first == Name)\n"; O << " return I->second;\n"; - O << " assert(false && \"Operand not in map!\");\n"; - O << " return 0;\n"; + O << " llvm_unreachable(\"Operand not in map!\");\n"; O << "}\n\n"; }