Ignore:
Timestamp:
Sep 15, 2016, 10:17:16 AM (8 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, resolv-new, with_gc
Children:
aa8f9df
Parents:
96a10cd
git-author:
Rob Schluntz <rschlunt@…> (09/14/16 22:32:34)
git-committer:
Rob Schluntz <rschlunt@…> (09/15/16 10:17:16)
Message:

replace results list on Expressions with a single Type field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r96a10cd r906e24d  
    309309                                                        UntypedExpr * newExpr = new UntypedExpr( new NameExpr( "*?" ) );
    310310                                                        newExpr->get_args().push_back( *arg );
    311                                                         assert( (*arg)->get_results().size() == 1 );
    312                                                         Type * type = InitTweak::getPointerBase( (*arg)->get_results().front() );
     311                                                        Type * type = InitTweak::getPointerBase( (*arg)->get_result() );
    313312                                                        assert( type );
    314                                                         newExpr->get_results().push_back( type->clone() );
     313                                                        newExpr->set_result( type->clone() );
    315314                                                        *arg = newExpr;
    316315                                                } // if
     
    527526                extension( castExpr );
    528527                output << "(";
    529                 if ( castExpr->get_results().empty() ) {
     528                if ( castExpr->get_result()->isVoid() ) {
    530529                        output << "(void)" ;
    531                 } else if ( ! castExpr->get_results().front()->get_isLvalue() ) {
     530                } else if ( ! castExpr->get_result()->get_isLvalue() ) {
    532531                        // at least one result type of cast, but not an lvalue
    533532                        output << "(";
    534                         output << genType( castExpr->get_results().front(), "" );
     533                        output << genType( castExpr->get_result(), "" );
    535534                        output << ")";
    536535                } else {
Note: See TracChangeset for help on using the changeset viewer.