Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.cc

    r582ee28 rea6332d  
    4242
    4343void Declaration::fixUniqueId() {
    44         // don't need to set unique ID twice
    45         if ( uniqueId ) return;
    4644        uniqueId = ++lastUniqueId;
    4745        idMap[ uniqueId ] = this;
     
    6159}
    6260
     61std::ostream & operator<<( std::ostream & out, const Declaration * decl ) {
     62        if ( decl ){
     63                decl->print( out );
     64        } else {
     65                out << "nullptr";
     66        }
     67        return out;
     68}
     69
    6370
    6471AsmDecl::AsmDecl( AsmStmt *stmt ) : Declaration( "", Type::StorageClasses(), LinkageSpec::C ), stmt( stmt ) {
     
    7279}
    7380
    74 void AsmDecl::print( std::ostream &os, Indenter indent ) const {
     81void AsmDecl::print( std::ostream &os, int indent ) const {
    7582        stmt->print( os, indent );
    7683}
    7784
    78 void AsmDecl::printShort( std::ostream &os, Indenter indent ) const {
     85void AsmDecl::printShort( std::ostream &os, int indent ) const {
    7986        stmt->print( os, indent );
    8087}
Note: See TracChangeset for help on using the changeset viewer.