Changeset 906e24d for src/ResolvExpr/Unify.cc
- Timestamp:
- Sep 15, 2016, 10:17:16 AM (8 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r96a10cd r906e24d 588 588 } 589 589 590 // xxx - compute once and store in the FunctionType? 591 Type * extractResultType( FunctionType * function ) { 592 if ( function->get_returnVals().size() == 0 ) { 593 return new VoidType( Type::Qualifiers() ); 594 } else if ( function->get_returnVals().size() == 1 ) { 595 return function->get_returnVals().front()->get_type()->clone(); 596 } else { 597 TupleType * tupleType = new TupleType( Type::Qualifiers() ); 598 for ( DeclarationWithType * decl : function->get_returnVals() ) { 599 tupleType->get_types().push_back( decl->get_type()->clone() ); 600 } // for 601 return tupleType; 602 } 603 } 604 590 605 } // namespace ResolvExpr 591 606
Note: See TracChangeset
for help on using the changeset viewer.