Changeset c1ec14f for src


Ignore:
Timestamp:
May 16, 2018, 1:48:13 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, 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.