Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.h

    r888cbe4 re04ef3a  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // CodeGenerator.h --
     7// CodeGenerator.h -- 
    88//
    99// Author           : Richard C. Bilson
     
    6060                virtual void visit( MemberExpr *memberExpr );
    6161                virtual void visit( VariableExpr *variableExpr );
    62                 virtual void visit( ConstantExpr *constantExpr );
     62                virtual void visit( ConstantExpr *constantExpr ); 
    6363                virtual void visit( SizeofExpr *sizeofExpr );
    6464                virtual void visit( AlignofExpr *alignofExpr );
     
    8585                virtual void visit( ForStmt * );
    8686                virtual void visit( NullStmt * );
    87                 virtual void visit( DeclStmt * );
    88 
    89                 void genAttributes( std::list< Attribute * > & attributes );
     87                virtual void visit( DeclStmt * );
    9088
    9189                template< class Iterator > void genCommaList( Iterator begin, Iterator end );
     
    9492                        Indenter(CodeGenerator &cg) : cg(cg) {}
    9593                        CodeGenerator & cg;
    96                         std::ostream& operator()(std::ostream & os) const;
    97                 };
    98 
    99                 struct LabelPrinter {
    100                         LabelPrinter(CodeGenerator &cg) : cg(cg), labels( 0 ) {}
    101                         LabelPrinter & operator()( std::list< Label > & l );
    102                         CodeGenerator & cg;
    103                         std::list< Label > * labels;
     94                        std::ostream& operator()(std::ostream & os);
    10495                };
    10596
     
    115106                bool insideFunction;
    116107                std::ostream &output;
    117                 LabelPrinter printLabels;
    118108
    119109                void printDesignators( std::list< Expression * > & );
     110                static std::string printLabels ( std::list < Label > & );
    120111                void handleStorageClass( Declaration *decl );
    121112                void handleAggregate( AggregateDecl *aggDecl );
     
    123114
    124115        };
    125 
     116       
    126117        template< class Iterator >
    127118        void CodeGenerator::genCommaList( Iterator begin, Iterator end ) {
     
    134125                } // for
    135126        }
    136 
     127 
    137128        inline bool doSemicolon( Declaration* decl ) {
    138129                if ( FunctionDecl* func = dynamic_cast< FunctionDecl* >( decl ) ) {
Note: See TracChangeset for help on using the changeset viewer.