Changes in src/CodeGen/CodeGenerator.cc [906e24d:6eb8948]
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r906e24d r6eb8948 309 309 UntypedExpr * newExpr = new UntypedExpr( new NameExpr( "*?" ) ); 310 310 newExpr->get_args().push_back( *arg ); 311 Type * type = InitTweak::getPointerBase( (*arg)->get_result() ); 311 assert( (*arg)->get_results().size() == 1 ); 312 Type * type = InitTweak::getPointerBase( (*arg)->get_results().front() ); 312 313 assert( type ); 313 newExpr-> set_result( type->clone() );314 newExpr->get_results().push_back( type->clone() ); 314 315 *arg = newExpr; 315 316 } // if … … 526 527 extension( castExpr ); 527 528 output << "("; 528 if ( castExpr->get_result ()->isVoid() ) {529 if ( castExpr->get_results().empty() ) { 529 530 output << "(void)" ; 530 } else if ( ! castExpr->get_result ()->get_isLvalue() ) {531 } else if ( ! castExpr->get_results().front()->get_isLvalue() ) { 531 532 // at least one result type of cast, but not an lvalue 532 533 output << "("; 533 output << genType( castExpr->get_result (), "" );534 output << genType( castExpr->get_results().front(), "" ); 534 535 output << ")"; 535 536 } else { … … 653 654 asmExpr->get_operand()->accept( *this ); 654 655 output << " )"; 656 } 657 658 void CodeGenerator::visit( StmtExpr * stmtExpr ) { 659 output << "("; 660 stmtExpr->get_statements()->accept( *this ); 661 output << ")"; 655 662 } 656 663
Note:
See TracChangeset
for help on using the changeset viewer.