summaryrefslogtreecommitdiff
path: root/lib/TableGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-16 23:24:27 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-16 23:24:27 +0000
commit2dd674fdce68f8fd59d78a3bbab2cf5b8d220290 (patch)
tree8b7a43bbe2df7368233f7c1c688a09632ba12bbd /lib/TableGen
parent17d2dbd5f9dd6c0de86398178f302ef46ba6ec79 (diff)
downloadllvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.tar.gz
llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.tar.bz2
llvm-2dd674fdce68f8fd59d78a3bbab2cf5b8d220290.tar.xz
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
Diffstat (limited to 'lib/TableGen')
-rw-r--r--lib/TableGen/Record.cpp3
1 files changed, 0 insertions, 3 deletions
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<StringInit*>(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<DagInit*>(LHS);
DagInit *RHSs = dynamic_cast<DagInit*>(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<DefInit*>(LHS);
VarInit *LHSv = dynamic_cast<VarInit*>(LHS);