Ignore:
Timestamp:
Feb 22, 2019, 10:43:29 AM (5 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
no_list
Parents:
43e0949
Message:

Parameters and return value of functions are now vectors (and some related clean-up)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    r43e0949 r2f42718  
    127127
    128128        void ReturnFixer::premutate( ReturnStmt *returnStmt ) {
    129                 std::list< DeclarationWithType * > & returnVals = ftype->get_returnVals();
     129                auto & returnVals = ftype->returnVals;
    130130                assert( returnVals.size() == 0 || returnVals.size() == 1 );
    131131                // hands off if the function returns a reference - we don't want to allocate a temporary if a variable's address
     
    242242                // if this function is a user-defined constructor or destructor, mark down the type as "managed"
    243243                if ( ! LinkageSpec::isOverridable( dwt->get_linkage() ) && CodeGen::isCtorDtor( dwt->get_name() ) ) {
    244                         std::list< DeclarationWithType * > & params = GenPoly::getFunctionType( dwt->get_type() )->get_parameters();
     244                        auto & params = GenPoly::getFunctionType( dwt->get_type() )->parameters;
    245245                        assert( ! params.empty() );
    246246                        Type * type = InitTweak::getPointerBase( params.front()->get_type() );
     
    335335                // go through assertions and recursively add seen ctor/dtors
    336336                for ( auto & tyDecl : functionDecl->get_functionType()->get_forall() ) {
    337                         for ( DeclarationWithType *& assertion : tyDecl->get_assertions() ) {
     337                        for ( DeclarationWithType *& assertion : tyDecl->assertions ) {
    338338                                managedTypes.handleDWT( assertion );
    339339                        }
Note: See TracChangeset for help on using the changeset viewer.