Ignore:
Timestamp:
Aug 31, 2023, 11:31:15 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
950c58e
Parents:
92355883 (diff), 686912c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Resolve conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/GenImplicitCall.cpp

    r92355883 r2a301ff  
    1616#include "GenImplicitCall.hpp"
    1717
     18#include "AST/Copy.hpp"                  // for deepCopy
    1819#include "AST/Decl.hpp"                  // for ObjectDecl
    1920#include "AST/Expr.hpp"                  // for ConstantExpr, UntypedExpr,...
     
    115116        std::string cmp, update;
    116117
     118        const ast::Expr * dimension = deepCopy( array->dimension );
    117119        if ( forward ) {
    118120                // generate: for ( int i = 0; i < N; ++i )
    119121                begin = ast::ConstantExpr::from_int( loc, 0 );
    120                 end = array->dimension;
     122                end = dimension;
    121123                cmp = "?<?";
    122124                update = "++?";
     
    124126                // generate: for ( int i = N-1; i >= 0; --i )
    125127                begin = ast::UntypedExpr::createCall( loc, "?-?",
    126                         { array->dimension, ast::ConstantExpr::from_int( loc, 1 ) } );
     128                        { dimension, ast::ConstantExpr::from_int( loc, 1 ) } );
    127129                end = ast::ConstantExpr::from_int( loc, 0 );
    128130                cmp = "?>=?";
Note: See TracChangeset for help on using the changeset viewer.