Ignore:
Timestamp:
Jan 29, 2019, 4:15:27 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
no_list
Children:
bbbc067
Parents:
70a1c3ae
Message:

Changed std::list<Label> to vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r70a1c3ae rbee0694  
    6363        } // extension
    6464
    65         CodeGenerator::LabelPrinter & CodeGenerator::LabelPrinter::operator()( std::list< Label > & l ) {
     65        CodeGenerator::LabelPrinter & CodeGenerator::LabelPrinter::operator()( std::vector< Label > & l ) {
    6666                labels = &l;
    6767                return *this;
     
    6969
    7070        ostream & operator<<( ostream & output, CodeGenerator::LabelPrinter & printLabels ) {
    71                 std::list< Label > & labs = *printLabels.labels;
     71                std::vector< Label > & labs = *printLabels.labels;
    7272                // l.unique(); // assumes a sorted list. Why not use set? Does order matter?
    7373                for ( Label & l : labs ) {
     
    911911                if ( ! asmStmt->get_gotolabels().empty() ) {
    912912                        output << " : ";
    913                         for ( std::list<Label>::iterator begin = asmStmt->get_gotolabels().begin();; ) {
     913                        for ( std::vector< Label > ::iterator begin = asmStmt->get_gotolabels().begin();; ) {
    914914                                output << *begin++;
    915915                                if ( begin == asmStmt->get_gotolabels().end() ) break;
Note: See TracChangeset for help on using the changeset viewer.