Changeset a16764a6 for src/ControlStruct/LabelFixer.cc
- Timestamp:
- Feb 28, 2018, 4:48:22 PM (7 years ago)
- 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, resolv-new, with_gc
- Children:
- 446ffa3
- Parents:
- 6a8df56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/LabelFixer.cc
r6a8df56 ra16764a6 92 92 } else if ( labelTable[ l ]->defined() ) { 93 93 // defined twice, error 94 throwSemanticError( l.get_statement()->location, "Duplicate definition of label: " + l.get_name() );94 SemanticError( l.get_statement()->location, "Duplicate definition of label: " + l.get_name() ); 95 95 } else { 96 96 // used previously, but undefined until now -> link with this entry … … 117 117 118 118 // Builds a table that maps a label to its defining statement. 119 std::map<Label, Statement * > *LabelFixer::resolveJumps() throw ( SemanticError ) {119 std::map<Label, Statement * > *LabelFixer::resolveJumps() throw ( SemanticErrorException ) { 120 120 std::map< Label, Statement * > *ret = new std::map< Label, Statement * >(); 121 121 for ( std::map< Label, Entry * >::iterator i = labelTable.begin(); i != labelTable.end(); ++i ) { 122 122 if ( ! i->second->defined() ) { 123 throwSemanticError( i->first.get_statement()->location, "Use of undefined label: " + i->first.get_name() );123 SemanticError( i->first.get_statement()->location, "Use of undefined label: " + i->first.get_name() ); 124 124 } 125 125 (*ret)[ i->first ] = i->second->get_definition();
Note: See TracChangeset
for help on using the changeset viewer.