Ignore:
Timestamp:
Sep 15, 2016, 10:17:16 AM (5 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:
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/ResolvExpr/ResolveTypeof.cc

    r96a10cd r906e24d  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ResolveTypeof.cc -- 
     7// ResolveTypeof.cc --
    88//
    99// Author           : Richard C. Bilson
     
    5858                if ( typeofType->get_expr() ) {
    5959                        Expression *newExpr = resolveInVoidContext( typeofType->get_expr(), indexer );
    60                         assert( newExpr->get_results().size() > 0 );
    61                         Type *newType;
    62                         if ( newExpr->get_results().size() > 1 ) {
    63                                 TupleType *tupleType = new TupleType( Type::Qualifiers() );
    64                                 cloneAll( newExpr->get_results(), tupleType->get_types() );
    65                                 newType = tupleType;
    66                         } else {
    67                                 newType = newExpr->get_results().front()->clone();
    68                         } // if
     60                        assert( newExpr->has_result() && ! newExpr->get_result()->isVoid() );
     61                        Type *newType = newExpr->get_result();
    6962                        delete typeofType;
    7063                        return newType;
Note: See TracChangeset for help on using the changeset viewer.