Ignore:
Timestamp:
May 27, 2015, 4:40:05 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
46cbfe1, 52ac3b4
Parents:
6aa5ec0f
Message:

error if continue statement targets a location that is not an enclosing loop, better error messages for branch statements with labels, formatting, refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/LabelFixer.cc

    r6aa5ec0f rbe5aa1b  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 15:25:59 2015
    13 // Update Count     : 1
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Wed May 27 16:16:14 2015
     13// Update Count     : 4
    1414//
    1515
     
    4040
    4141        void LabelFixer::visit( FunctionDecl *functionDecl ) {
    42                 if ( functionDecl->get_statements() != 0 )
    43                         functionDecl->get_statements()->accept( *this );
     42                maybeAccept( functionDecl->get_statements(), *this );
    4443
    4544                MLEMutator mlemut( resolveJumps(), generator );
     
    102101                        Entry *e = i->second;
    103102
    104                         if ( def_us.find ( e->get_definition() ) == def_us.end() )
    105                                 def_us[ e->get_definition() ] = e;
    106                         else
     103                        if ( def_us.find ( e->get_definition() ) == def_us.end() ) {
     104                                def_us[ e->get_definition() ] = e;                             
     105                        } else {
    107106                                if ( e->used() )
    108107                                        def_us[ e->get_definition() ]->add_uses( e->get_uses() );
     108                        }
    109109                }
    110110
Note: See TracChangeset for help on using the changeset viewer.