Changeset cff1143 for src/ControlStruct


Ignore:
Timestamp:
Jul 9, 2015, 3:07:32 PM (10 years ago)
Author:
Aaron Moss <a3moss@…>
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:
0215a76f, dfee306
Parents:
82dd287 (diff), e5609dd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/ControlStruct/LabelFixer.cc

    r82dd287 rcff1143  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jun 24 16:24:34 2015
    13 // Update Count     : 141
     12// Last Modified On : Wed Jul 08 12:36:46 2015
     13// Update Count     : 145
    1414//
    1515
     
    6161
    6262        void LabelFixer::visit( FunctionDecl *functionDecl ) {
     63                // need to go into a nested function in a fresh state
     64                std::map < Label, Entry *> oldLabelTable = labelTable;
     65                labelTable.clear();
     66
    6367                maybeAccept( functionDecl->get_statements(), *this );
    6468
    6569                MLEMutator mlemut( resolveJumps(), generator );
    6670                functionDecl->acceptMutator( mlemut );
     71
     72                // and remember the outer function's labels when
     73                // returning to it
     74                labelTable = oldLabelTable;
    6775        }
    6876
Note: See TracChangeset for help on using the changeset viewer.