Ignore:
Timestamp:
Mar 30, 2017, 5:21:07 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
936a287
Parents:
89ae7f4
Message:

remove duplication in compound literal, support aggregate-type compound literals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r89ae7f4 rfbcde64  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 09:06:01 2017
    13 // Update Count     : 481
     12// Last Modified On : Thu Mar 30 16:38:01 2017
     13// Update Count     : 482
    1414//
    1515
     
    674674
    675675        void CodeGenerator::visit( CompoundLiteralExpr *compLitExpr ) {
    676                 assert( compLitExpr->get_type() && dynamic_cast< ListInit * > ( compLitExpr->get_initializer() ) );
    677                 output << "(" << genType( compLitExpr->get_type(), "", pretty ) << ")";
     676                assert( compLitExpr->get_result() && dynamic_cast< ListInit * > ( compLitExpr->get_initializer() ) );
     677                output << "(" << genType( compLitExpr->get_result(), "", pretty ) << ")";
    678678                compLitExpr->get_initializer()->accept( *this );
    679679        }
Note: See TracChangeset for help on using the changeset viewer.