Changeset aadc9a4 for src/GenPoly/Box.cc
- Timestamp:
- Jan 12, 2016, 6:12:10 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 4d7e8f5
- Parents:
- ebe9b3a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
rebe9b3a raadc9a4 231 231 // process polymorphic return value 232 232 retval = 0; 233 std::string typeName; 234 if ( isPolyRet( functionDecl->get_functionType(), typeName ) && functionDecl->get_linkage() == LinkageSpec::Cforall ) { 233 if ( isPolyRet( functionDecl->get_functionType() ) && functionDecl->get_linkage() == LinkageSpec::Cforall ) { 235 234 retval = functionDecl->get_functionType()->get_returnVals().front(); 236 235 … … 787 786 std::list< Expression *>::iterator paramBegin = appExpr->get_args().begin(); 788 787 789 std::string typeName; 790 if ( isPolyRet( function, typeName ) ) { 791 ret = addPolyRetParam( appExpr, function, typeName, arg ); 788 if ( ReferenceToType *polyType = isPolyRet( function ) ) { 789 ret = addPolyRetParam( appExpr, function, polyType->get_name(), arg ); 792 790 } else if ( needsAdapter( function, scopeTyVars ) ) { 793 791 // std::cerr << "needs adapter: "; … … 994 992 995 993 // move polymorphic return type to parameter list 996 std::string typeName; 997 if ( isPolyRet( funcType, typeName ) ) { 994 if ( isPolyRet( funcType ) ) { 998 995 DeclarationWithType *ret = funcType->get_returnVals().front(); 999 996 ret->set_type( new PointerType( Type::Qualifiers(), ret->get_type() ) );
Note: See TracChangeset
for help on using the changeset viewer.