Ignore:
Timestamp:
Aug 31, 2023, 11:31:15 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
950c58e
Parents:
92355883 (diff), 686912c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Resolve conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/ExceptDeclNew.cpp

    r92355883 r2a301ff  
    242242}
    243243
    244 ast::ObjectDecl const * createExternVTable(
     244ast::ObjectDecl * createExternVTable(
    245245                CodeLocation const & location,
    246246                std::string const & exceptionName,
     
    299299                } ),
    300300                ast::Storage::Classes(),
    301                 ast::Linkage::Cforall
     301                ast::Linkage::Cforall,
     302                { new ast::Attribute( "cfa_linkonce" ) }
    302303        );
    303304}
     
    352353                } ),
    353354                ast::Storage::Classes(),
    354                 ast::Linkage::Cforall
    355         );
    356 }
    357 
    358 ast::ObjectDecl const * createVirtualTable(
     355                ast::Linkage::Cforall,
     356                { new ast::Attribute( "cfa_linkonce" ) }
     357        );
     358}
     359
     360ast::ObjectDecl * createVirtualTable(
    359361                CodeLocation const & location,
    360362                std::string const & exceptionName,
     
    451453        std::string const & tableName = decl->name;
    452454
     455        ast::ObjectDecl * retDecl;
    453456        if ( decl->storage.is_extern ) {
    454457                // Unique type-ids are only needed for polymorphic instances.
     
    457460                                createExternTypeId( location, exceptionName, params ) );
    458461                }
    459                 return createExternVTable( location, exceptionName, params, tableName );
     462                retDecl = createExternVTable( location, exceptionName, params, tableName );
    460463        } else {
    461464                // Unique type-ids are only needed for polymorphic instances.
     
    468471                declsToAddBefore.push_back(
    469472                        createMsg( location, exceptionName, params ) );
    470                 return createVirtualTable(
     473                retDecl = createVirtualTable(
    471474                        location, exceptionName, params, tableName );
    472475        }
     476
     477        for ( ast::ptr<ast::Attribute> const & attr : decl->attributes ) {
     478                retDecl->attributes.push_back( attr );
     479        }
     480
     481        return retDecl;
    473482}
    474483
     
    478487
    479488                std::string vtableName = Virtual::vtableTypeName( inst->name );
     489
    480490                auto newType = new ast::StructInstType( vtableName );
    481491                for ( ast::ptr<ast::Expr> const & param : inst->params ) {
Note: See TracChangeset for help on using the changeset viewer.