Changeset 837ce06 for src/InitTweak/FixInit.cc
- Timestamp:
- Oct 19, 2017, 2:20:53 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 72f85de
- Parents:
- 6840e7c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r6840e7c r837ce06 653 653 // wraps the more complicated code. 654 654 static UniqueName dtorNamer( "__cleanup_dtor" ); 655 FunctionDecl * dtorFunc = FunctionDecl::newFunction( dtorNamer.newName(), SymTab::genDefaultType( objDecl->type ), new CompoundStmt( noLabels ) );655 FunctionDecl * dtorFunc = FunctionDecl::newFunction( dtorNamer.newName(), SymTab::genDefaultType( objDecl->type, false ), new CompoundStmt( noLabels ) ); 656 656 stmtsToAddBefore.push_back( new DeclStmt( noLabels, dtorFunc ) ); 657 657 658 658 // the original code contains uses of objDecl - replace them with the newly generated 'this' parameter. 659 ObjectDecl * thisParam = get ThisParam( dtorFunc->type );659 ObjectDecl * thisParam = getParamThis( dtorFunc->type ); 660 660 VarExprReplacer::replace( dtor, { std::make_pair( objDecl, thisParam ) } ); 661 661 dtorFunc->statements->push_back( dtor );
Note: See TracChangeset
for help on using the changeset viewer.