Changeset 1f44196 for src/ResolvExpr/Unify.cc
- Timestamp:
- Nov 29, 2016, 3:30:59 PM (9 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:
- 8e5724e
- Parents:
- 3a2128f (diff), 9129a84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Unify.cc
r3a2128f r1f44196 597 597 } 598 598 599 // xxx - compute once and store in the FunctionType? 600 Type * extractResultType( FunctionType * function ) { 601 if ( function->get_returnVals().size() == 0 ) { 602 return new VoidType( Type::Qualifiers() ); 603 } else if ( function->get_returnVals().size() == 1 ) { 604 return function->get_returnVals().front()->get_type()->clone(); 605 } else { 606 TupleType * tupleType = new TupleType( Type::Qualifiers() ); 607 for ( DeclarationWithType * decl : function->get_returnVals() ) { 608 tupleType->get_types().push_back( decl->get_type()->clone() ); 609 } // for 610 return tupleType; 611 } 612 } 599 613 } // namespace ResolvExpr 600 614
Note:
See TracChangeset
for help on using the changeset viewer.