Changeset 0f8e4ac for src/ControlStruct/LabelFixer.cc
- Timestamp:
- Jun 16, 2016, 12:24:39 PM (9 years ago)
- 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, with_gc
- Children:
- 25296a3
- Parents:
- f4bc57c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/LabelFixer.cc
rf4bc57c r0f8e4ac 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // LabelFixer.cc -- 7 // LabelFixer.cc -- 8 8 // 9 9 // Author : Rodolfo G. Esteves … … 86 86 87 87 88 // sets the definition of the labelTable entry to be the provided 88 // sets the definition of the labelTable entry to be the provided 89 89 // statement for every label in the list parameter. Happens for every kind of statement 90 90 Label LabelFixer::setLabelsDef( std::list< Label > &llabel, Statement *definition ) { … … 101 101 } else if ( labelTable[ *i ]->defined() ) { 102 102 // defined twice, error 103 throw SemanticError( "Duplicate definition of label: " + *i);103 throw SemanticError( "Duplicate definition of label: " + (*i).get_name() ); 104 104 } else { 105 105 // used previously, but undefined until now -> link with this entry … … 109 109 } // for 110 110 111 // produce one of the labels attached to this statement to be 111 // produce one of the labels attached to this statement to be 112 112 // temporarily used as the canonical label 113 113 return labelTable[ llabel.front() ]->get_label(); … … 130 130 for ( std::map< Label, Entry * >::iterator i = labelTable.begin(); i != labelTable.end(); ++i ) { 131 131 if ( ! i->second->defined() ) { 132 throw SemanticError( "Use of undefined label: " + i->first );132 throw SemanticError( "Use of undefined label: " + i->first.get_name() ); 133 133 } 134 134 (*ret)[ i->first ] = i->second->get_definition();
Note: See TracChangeset
for help on using the changeset viewer.