Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/ScrubTyVars.cc

    r7754cde rffad73a  
    4646        Expression * ScrubTyVars::mutate( SizeofExpr *szeof ) {
    4747                // sizeof( T ) => _sizeof_T parameter, which is the size of T
    48                 if ( Type *polyType = isPolyType( szeof->get_type() ) ) {
    49                         Expression *expr = new NameExpr( sizeofName( polyType ) );
     48                if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( szeof->get_type() ) ) {
     49                        Expression *expr = new NameExpr( sizeofName( typeInst ) );
    5050                        return expr;
    5151                } else {
     
    5656        Expression * ScrubTyVars::mutate( AlignofExpr *algnof ) {
    5757                // alignof( T ) => _alignof_T parameter, which is the alignment of T
    58                 if ( Type *polyType = isPolyType( algnof->get_type() ) ) {
    59                         Expression *expr = new NameExpr( alignofName( polyType ) );
     58                if ( TypeInstType *typeInst = dynamic_cast< TypeInstType * >( algnof->get_type() ) ) {
     59                        Expression *expr = new NameExpr( alignofName( typeInst ) );
    6060                        return expr;
    6161                } else {
Note: See TracChangeset for help on using the changeset viewer.