Changeset aa8f9df for src/CodeGen
- Timestamp:
- Sep 15, 2016, 3:22:50 PM (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:
- 4ab9536
- Parents:
- fd782b2 (diff), 906e24d (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/CodeGen/CodeGenerator.cc
rfd782b2 raa8f9df 309 309 UntypedExpr * newExpr = new UntypedExpr( new NameExpr( "*?" ) ); 310 310 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() ); 313 312 assert( type ); 314 newExpr-> get_results().push_back( type->clone() );313 newExpr->set_result( type->clone() ); 315 314 *arg = newExpr; 316 315 } // if … … 527 526 extension( castExpr ); 528 527 output << "("; 529 if ( castExpr->get_result s().empty() ) {528 if ( castExpr->get_result()->isVoid() ) { 530 529 output << "(void)" ; 531 } else if ( ! castExpr->get_result s().front()->get_isLvalue() ) {530 } else if ( ! castExpr->get_result()->get_isLvalue() ) { 532 531 // at least one result type of cast, but not an lvalue 533 532 output << "("; 534 output << genType( castExpr->get_result s().front(), "" );533 output << genType( castExpr->get_result(), "" ); 535 534 output << ")"; 536 535 } else {
Note: See TracChangeset
for help on using the changeset viewer.