Changeset 4a368547 for src/MakeLibCfa.cc
- Timestamp:
- May 29, 2017, 3:08:47 PM (7 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:
- 2ab67b9, a029714
- Parents:
- ff98952 (diff), 4c5b972 (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/MakeLibCfa.cc
rff98952 r4a368547 75 75 case CodeGen::OT_POSTFIXASSIGN: 76 76 case CodeGen::OT_INFIXASSIGN: 77 case CodeGen::OT_CTOR: 78 case CodeGen::OT_DTOR: 77 79 funcDecl->get_statements()->get_kids().push_back( new ReturnStmt( std::list< Label >(), newExpr ) ); 78 80 break; 79 case CodeGen::OT_CTOR:80 // ctors don't return a value81 if ( funcDecl->get_functionType()->get_parameters().size() == 1 ) {82 // intrinsic default constructors should do nothing83 // delete newExpr;84 break;85 } else {86 assert( funcDecl->get_functionType()->get_parameters().size() == 2 );87 // anything else is a single parameter constructor that is effectively a C-style assignment88 // delete newExpr->get_function();89 assert(newExpr->get_args().size()==2);90 newExpr->set_function( new NameExpr( "?=?" ) );91 funcDecl->get_statements()->get_kids().push_back( new ExprStmt( std::list< Label >(), newExpr ) );92 }93 break;94 case CodeGen::OT_DTOR:95 // intrinsic destructors should do nothing96 // delete newExpr;97 break;98 81 case CodeGen::OT_CONSTANT: 99 82 case CodeGen::OT_LABELADDRESS:
Note: See TracChangeset
for help on using the changeset viewer.