Changeset ca1c11f for src/InitTweak


Ignore:
Timestamp:
Jan 20, 2016, 12:36:27 PM (10 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
771b3c3
Parents:
f1e012b
Message:

added constructor debug flag -c, fixed mistake in removing extraneous destructor calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    rf1e012b rca1c11f  
    1010// Created On       : Wed Jan 13 16:29:30 2016
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Jan 19 13:25:13 2016
    13 // Update Count     : 27
     12// Last Modified On : Tue Jan 19 16:36:59 2016
     13// Update Count     : 30
    1414//
    1515
     
    7373        CompoundStmt * FixInit::mutate( CompoundStmt * compoundStmt ) {
    7474                std::list< Statement * > & statements = compoundStmt->get_kids();
    75                 for ( std::list< Statement * >::iterator it = statements.begin(); it != statements.end(); ++it ) {
     75                for ( std::list< Statement * >::iterator it = statements.begin(); it != statements.end(); ) {
    7676                        // remove if instrinsic destructor statement
    7777                        // xxx - test user manually calling intrinsic functions - what happens?
     
    8181                                                if ( function->get_var()->get_name() == "^?{}" && function->get_var()->get_linkage() == LinkageSpec::Intrinsic ) {
    8282                                                        statements.erase(it++);
     83                                                        continue;
     84                                                } else {
    8385                                                }
    8486                                        }
    8587                                }
    8688                        }
     89                        ++it;
    8790                }
    8891                // mutate non-destructor statements
    89                 return Mutator::mutate( compoundStmt );
     92                return PolyMutator::mutate( compoundStmt );
    9093        }
    9194
Note: See TracChangeset for help on using the changeset viewer.