mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user