Changeset bee0694 for src/CodeGen
- Timestamp:
- Jan 29, 2019, 4:15:27 PM (6 years ago)
- Branches:
- no_list
- Children:
- bbbc067
- Parents:
- 70a1c3ae
- Location:
- src/CodeGen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r70a1c3ae rbee0694 63 63 } // extension 64 64 65 CodeGenerator::LabelPrinter & CodeGenerator::LabelPrinter::operator()( std:: list< Label > & l ) {65 CodeGenerator::LabelPrinter & CodeGenerator::LabelPrinter::operator()( std::vector< Label > & l ) { 66 66 labels = &l; 67 67 return *this; … … 69 69 70 70 ostream & operator<<( ostream & output, CodeGenerator::LabelPrinter & printLabels ) { 71 std:: list< Label >& labs = *printLabels.labels;71 std::vector< Label > & labs = *printLabels.labels; 72 72 // l.unique(); // assumes a sorted list. Why not use set? Does order matter? 73 73 for ( Label & l : labs ) { … … 911 911 if ( ! asmStmt->get_gotolabels().empty() ) { 912 912 output << " : "; 913 for ( std:: list<Label>::iterator begin = asmStmt->get_gotolabels().begin();; ) {913 for ( std::vector< Label > ::iterator begin = asmStmt->get_gotolabels().begin();; ) { 914 914 output << *begin++; 915 915 if ( begin == asmStmt->get_gotolabels().end() ) break; -
src/CodeGen/CodeGenerator.h
r70a1c3ae rbee0694 124 124 struct LabelPrinter { 125 125 LabelPrinter(CodeGenerator &cg) : cg(cg), labels( 0 ) {} 126 LabelPrinter & operator()( std:: list< Label >& l );126 LabelPrinter & operator()( std::vector< Label > & l ); 127 127 CodeGenerator & cg; 128 std:: list< Label >* labels;128 std::vector< Label > * labels; 129 129 }; 130 130
Note: See TracChangeset
for help on using the changeset viewer.