Changeset 7c2a7b6


Ignore:
Timestamp:
Mar 14, 2018, 5:04:09 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
692afbb
Parents:
ed3ff0a2
Message:

Fix unhandled enumeration value warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    red3ff0a2 r7c2a7b6  
    928928                        output << "continue";
    929929                        break;
     930                  case BranchStmt::FallThrough:
     931                  case BranchStmt::FallThroughDefault:
     932                        assertf( ! genC, "fallthru should not reach code generation." );
     933                  output << "fallthru";
     934                        break;
    930935                } // switch
     936                // print branch target for labelled break/continue/fallthru in debug mode
     937                if ( ! genC && branchStmt->get_type() != BranchStmt::Goto ) {
     938                        if ( ! branchStmt->get_target().empty() ) {
     939                                output << " " << branchStmt->get_target();
     940                        } else if ( branchStmt->get_type() == BranchStmt::FallThrough ) {
     941                                output << " default";
     942                        }
     943                }
    931944                output << ";";
    932945        }
Note: See TracChangeset for help on using the changeset viewer.