diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-01-16 23:24:27 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-01-16 23:24:27 +0000 |
commit | 486df738c305eeb148d557a94777f2c04aa72d40 (patch) | |
tree | bc1953ce53be6eb05f8602c42ed18e93473437c1 /llvm/lib/TableGen | |
parent | b1691ccaaa50f432f24d67759d9e78052f34cacd (diff) | |
download | bcm5719-llvm-486df738c305eeb148d557a94777f2c04aa72d40.tar.gz bcm5719-llvm-486df738c305eeb148d557a94777f2c04aa72d40.zip |
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)
llvm-svn: 148262
Diffstat (limited to 'llvm/lib/TableGen')
-rw-r--r-- | llvm/lib/TableGen/Record.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp index 25ff0629072..bdd6e1562b9 100644 --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/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); |