From 2dd674fdce68f8fd59d78a3bbab2cf5b8d220290 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Mon, 16 Jan 2012 23:24:27 +0000 Subject: Removing unused default switch cases in switches over enums that already account for all enumeration values explicitly. (This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148262 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/Record.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/TableGen') diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 25ff062907..bdd6e1562b 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -727,7 +727,6 @@ UnOpInit *UnOpInit::get(UnaryOp opc, Init *lhs, RecTy *Type) { Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const { switch (getOpcode()) { - default: assert(0 && "Unknown unop"); case CAST: { if (getType()->getAsString() == "string") { StringInit *LHSs = dynamic_cast(LHS); @@ -880,7 +879,6 @@ BinOpInit *BinOpInit::get(BinaryOp opc, Init *lhs, Init *BinOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const { switch (getOpcode()) { - default: assert(0 && "Unknown binop"); case CONCAT: { DagInit *LHSs = dynamic_cast(LHS); DagInit *RHSs = dynamic_cast(RHS); @@ -1129,7 +1127,6 @@ static Init *ForeachHelper(Init *LHS, Init *MHS, Init *RHS, RecTy *Type, Init *TernOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const { switch (getOpcode()) { - default: assert(0 && "Unknown binop"); case SUBST: { DefInit *LHSd = dynamic_cast(LHS); VarInit *LHSv = dynamic_cast(LHS); -- cgit v1.2.3-70-g09d2