Ignore:
Timestamp:
Mar 16, 2018, 5:15:02 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
8d7bef2
Parents:
6171841
git-author:
Aaron Moss <a3moss@…> (03/16/18 17:04:24)
git-committer:
Aaron Moss <a3moss@…> (03/16/18 17:15:02)
Message:

First pass at delete removal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixGlobalInit.cc

    r6171841 r68f9c43  
    5757                GlobalFixer & fixer = visitor.pass;
    5858                // don't need to include function if it's empty
    59                 if ( fixer.initFunction->get_statements()->get_kids().empty() ) {
    60                         delete fixer.initFunction;
    61                 } else {
     59                if ( ! fixer.initFunction->get_statements()->get_kids().empty() ) {
    6260                        translationUnit.push_back( fixer.initFunction );
    6361                } // if
    6462
    65                 if ( fixer.destroyFunction->get_statements()->get_kids().empty() ) {
    66                         delete fixer.destroyFunction;
    67                 } else {
     63                if ( ! fixer.destroyFunction->get_statements()->get_kids().empty() ) {
    6864                        translationUnit.push_back( fixer.destroyFunction );
    6965                } // if
     
    130126                                objDecl->set_init( NULL );
    131127                        } // if
    132                         delete ctorInit;
    133128                } // if
    134129        }
Note: See TracChangeset for help on using the changeset viewer.