Changes in / [f9b42bd:dee680c]


Ignore:
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Lvalue.cpp

    rf9b42bd rdee680c  
    1010// Created On       : Thu Sep 15 14:08:00 2022
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Oct  6  9:59:00 2022
    13 // Update Count     : 0
     12// Last Modified On : Mon Aug 12 18:07:00 2024
     13// Update Count     : 1
    1414//
    1515
     
    119119/// Replace all reference types with pointer types.
    120120struct ReferenceTypeElimination final {
     121        ast::SizeofExpr const * previsit( ast::SizeofExpr const * expr );
     122        ast::AlignofExpr const * previsit( ast::AlignofExpr const * expr );
    121123        ast::Type const * postvisit( ast::ReferenceType const * type );
    122124};
     
    603605}
    604606
     607ast::SizeofExpr const * ReferenceTypeElimination::previsit(
     608                ast::SizeofExpr const * expr ) {
     609        if ( expr->expr ) return expr;
     610        return ast::mutate_field( expr, &ast::SizeofExpr::type,
     611                expr->type->stripReferences() );
     612}
     613
     614ast::AlignofExpr const * ReferenceTypeElimination::previsit(
     615                ast::AlignofExpr const * expr ) {
     616        if ( expr->expr ) return expr;
     617        return ast::mutate_field( expr, &ast::AlignofExpr::type,
     618                expr->type->stripReferences() );
     619}
     620
    605621ast::Type const * ReferenceTypeElimination::postvisit(
    606622                ast::ReferenceType const * type ) {
Note: See TracChangeset for help on using the changeset viewer.