Ignore:
Timestamp:
Sep 7, 2018, 6:20:22 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
cde3891
Parents:
2f86ddf
Message:

Elide generated dtor handler for intrinsic arguments and returns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r2f86ddf r9b086ca  
    558558                        Expression * dtor = makeCtorDtor( "^?{}", ret );
    559559
    560                         // // xxx - check if intrinsic and elide if so
    561                         // if ( arg && isIntrinsicCallExpr( dtor ) ) {
    562                         //      arg = new CommaExpr( arg, new VariableExpr( ret ) );
    563                         //      return;
    564                         // }
     560                        // if the chosen destructor is intrinsic, elide the generated dtor handler
     561                        if ( arg && isIntrinsicCallExpr( dtor ) ) {
     562                                arg = new CommaExpr( arg, new VariableExpr( ret ) );
     563                                return;
     564                        }
    565565
    566566                        if ( ! dtor->env ) dtor->env = maybeClone( env );
Note: See TracChangeset for help on using the changeset viewer.