Changeset 9b4c936
- Timestamp:
- Aug 30, 2016, 11:46:37 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, 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:
- 8b6b552
- Parents:
- ad4581b
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/InitTweak.cc
rad4581b r9b4c936 79 79 public: 80 80 ExprImpl( Expression * expr ) : arg( expr ) {} 81 82 ~ExprImpl() { delete arg; } 81 83 82 84 virtual std::list< Expression * > next( std::list< Expression * > & indices ) { … … 122 124 123 125 void InitExpander::clearArrayIndices() { 126 deleteAll( indices ); 124 127 indices.clear(); 125 128 } -
src/SymTab/Autogen.cc
rad4581b r9b4c936 64 64 65 65 template< typename OutputIterator > 66 void makeUnionFieldsAssignment( ObjectDecl *srcParam, ObjectDecl *dstParam, UnionInstType *unionType,OutputIterator out ) {66 void makeUnionFieldsAssignment( ObjectDecl *srcParam, ObjectDecl *dstParam, OutputIterator out ) { 67 67 UntypedExpr *copy = new UntypedExpr( new NameExpr( "__builtin_memcpy" ) ); 68 68 copy->get_args().push_back( new VariableExpr( dstParam ) ); … … 413 413 dtorDecl->fixUniqueId(); 414 414 415 makeUnionFieldsAssignment( srcParam, dstParam, cloneWithParams( refType, unionParams ),back_inserter( assignDecl->get_statements()->get_kids() ) );416 if ( isDynamicLayout ) makeUnionFieldsAssignment( srcParam, returnVal, cloneWithParams( refType, unionParams ),back_inserter( assignDecl->get_statements()->get_kids() ) );415 makeUnionFieldsAssignment( srcParam, dstParam, back_inserter( assignDecl->get_statements()->get_kids() ) ); 416 if ( isDynamicLayout ) makeUnionFieldsAssignment( srcParam, returnVal, back_inserter( assignDecl->get_statements()->get_kids() ) ); 417 417 else assignDecl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new VariableExpr( srcParam ) ) ); 418 418 … … 434 434 ctor->fixUniqueId(); 435 435 436 makeUnionFieldsAssignment( srcParam, dstParam, cloneWithParams( refType, unionParams ),back_inserter( ctor->get_statements()->get_kids() ) );436 makeUnionFieldsAssignment( srcParam, dstParam, back_inserter( ctor->get_statements()->get_kids() ) ); 437 437 memCtors.push_back( ctor ); 438 438 // only generate a ctor for the first field
Note: See TracChangeset
for help on using the changeset viewer.