Changeset 4e22d7d


Ignore:
Timestamp:
Jan 3, 2018, 10:10:41 AM (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, resolv-new, with_gc
Children:
be9aa0f
Parents:
300d75b
Message:

More precisely determine when array is VLA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    r300d75b r4e22d7d  
    187187                        // need to resolve array dimensions in order to accurately determine if constexpr
    188188                        ResolvExpr::findSingleExpression( arrayType->dimension, SymTab::SizeType->clone(), indexer );
     189                        // array is variable-length when the dimension is not constexpr
     190                        arrayType->isVarLen = ! isConstExpr( arrayType->dimension );
    189191                        // don't need to hoist dimension if it's definitely pure - only need to if there's potential for side effects.
    190192                        if ( ! Tuples::maybeImpure( arrayType->dimension ) ) return;
Note: See TracChangeset for help on using the changeset viewer.