Changeset 4d2434a for src/CodeGen


Ignore:
Timestamp:
Aug 2, 2016, 6:37:08 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
8a443f4
Parents:
39f84a4
Message:

major reorganization of constructor generation from initializer list so that it now works with multi-dimensional arrays

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r39f84a4 r4d2434a  
    270270                printDesignators( init->get_designators() );
    271271                output << "{ ";
    272                 if ( init->begin_initializers() == init->end_initializers() ) {
     272                if ( init->begin() == init->end() ) {
    273273                        // illegal to leave initializer list empty for scalar initializers, but always legal to have 0
    274274                        output << "0";
    275275                } else {
    276                         genCommaList( init->begin_initializers(), init->end_initializers() );
     276                        genCommaList( init->begin(), init->end() );
    277277                }
    278278                output << " }";
Note: See TracChangeset for help on using the changeset viewer.