Changeset c1ec14f


Ignore:
Timestamp:
May 16, 2018, 1:48:13 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
Children:
0873d22e
Parents:
099e202
Message:

Strip only one reference when fixing intrinsic reference-returning function calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Lvalue.cc

    r099e202 rc1ec14f  
    166166                        if ( isIntrinsicReference( appExpr ) ) {
    167167                                // eliminate reference types from intrinsic applications - now they return lvalues
    168                                 Type * result = appExpr->result;
    169                                 appExpr->result = result->stripReferences()->clone();
     168                                ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result );
     169                                appExpr->result = result->base->clone();
    170170                                appExpr->result->set_lvalue( true );
    171171                                if ( ! inIntrinsic ) {
     
    183183                void FixIntrinsicResult::premutate( FunctionDecl * funcDecl ) {
    184184                        GuardValue( inIntrinsic );
    185                         inIntrinsic =  funcDecl->linkage == LinkageSpec::Intrinsic;
     185                        inIntrinsic = funcDecl->linkage == LinkageSpec::Intrinsic;
    186186                }
    187187
Note: See TracChangeset for help on using the changeset viewer.