Changeset c4b9fa9
- Timestamp:
- Dec 1, 2023, 3:19:03 PM (13 months ago)
- Branches:
- master
- Children:
- 2f8d351, 539a8c8
- Parents:
- dd900b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cpp
rdd900b5 rc4b9fa9 1626 1626 1627 1627 /// Converts polymorphic type into a suitable monomorphic representation. 1628 /// Currently: __attribute__(( aligned(8) )) char[size_T];1628 /// Currently: __attribute__(( aligned(8) )) char[size_T]; 1629 1629 ast::Type * polyToMonoType( CodeLocation const & location, 1630 1630 ast::Type const * declType ) { … … 1632 1632 auto size = new ast::NameExpr( location, 1633 1633 sizeofName( Mangle::mangleType( declType ) ) ); 1634 auto aligned = new ast::Attribute( "aligned",1635 { ast::ConstantExpr::from_int( location, 8 ) } );1636 1634 auto ret = new ast::ArrayType( charType, size, 1637 1635 ast::VariableLen, ast::DynamicDim, ast::CV::Qualifiers() ); 1638 ret->attributes.push_back( aligned ); 1636 ret->attributes.emplace_back( new ast::Attribute( "aligned", 1637 { ast::ConstantExpr::from_int( location, 8 ) } ) ); 1639 1638 return ret; 1640 1639 } … … 1767 1766 long findMember( ast::DeclWithType const * memberDecl, 1768 1767 const ast::vector<ast::Decl> & baseDecls ) { 1769 for ( auto pair: enumerate( baseDecls ) ) {1770 if ( isMember( memberDecl, pair.val.get() ) ) {1771 return pair.idx;1768 for ( auto const & [index, value] : enumerate( baseDecls ) ) { 1769 if ( isMember( memberDecl, value.get() ) ) { 1770 return index; 1772 1771 } 1773 1772 }
Note: See TracChangeset
for help on using the changeset viewer.