Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.proto.hpp

    r4ec9513 reb211bf  
    2626
    2727struct PureVisitor;
    28 
    29 template<typename node_t>
    30 node_t * deepCopy( const node_t * localRoot );
    3128
    3229namespace __pass {
     
    399396                static inline auto addStructFwd( core_t & core, int, const ast::StructDecl * decl ) -> decltype( core.symtab.addStruct( decl ), void() ) {
    400397                        ast::StructDecl * fwd = new ast::StructDecl( decl->location, decl->name );
    401                         for ( const auto & param : decl->params ) {
    402                                 fwd->params.push_back( deepCopy( param.get() ) );
    403                         }
     398                        fwd->params = decl->params;
    404399                        core.symtab.addStruct( fwd );
    405400                }
     
    410405                template<typename core_t>
    411406                static inline auto addUnionFwd( core_t & core, int, const ast::UnionDecl * decl ) -> decltype( core.symtab.addUnion( decl ), void() ) {
    412                         ast::UnionDecl * fwd = new ast::UnionDecl( decl->location, decl->name );
    413                         for ( const auto & param : decl->params ) {
    414                                 fwd->params.push_back( deepCopy( param.get() ) );
    415                         }
     407                        UnionDecl * fwd = new UnionDecl( decl->location, decl->name );
     408                        fwd->params = decl->params;
    416409                        core.symtab.addUnion( fwd );
    417410                }
Note: See TracChangeset for help on using the changeset viewer.