Changeset 8b11840 for src/InitTweak


Ignore:
Timestamp:
Sep 22, 2017, 1:50:00 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
b56c17c
Parents:
05807e9
Message:

Cleanup pass through several files

Location:
src/InitTweak
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.cc

    r05807e9 r8b11840  
    115115
    116116        void genInit( std::list< Declaration * > & translationUnit ) {
    117                 ReturnFixer::makeReturnTemp( translationUnit );
     117                fixReturnStatements( translationUnit );
    118118                HoistArrayDimension::hoistArrayDimension( translationUnit );
    119119                CtorDtor::generateCtorDtor( translationUnit );
    120120        }
    121121
    122         void ReturnFixer::makeReturnTemp( std::list< Declaration * > & translationUnit ) {
     122        void fixReturnStatements( std::list< Declaration * > & translationUnit ) {
    123123                PassVisitor<ReturnFixer> fixer;
    124124                mutateAll( translationUnit, fixer );
  • src/InitTweak/GenInit.h

    r05807e9 r8b11840  
    2525        void genInit( std::list< Declaration * > & translationUnit );
    2626
    27   /// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument
    28   ImplicitCtorDtorStmt * genCtorDtor( const std::string & fname, ObjectDecl * objDecl, Expression * arg = nullptr );
     27        /// Converts return statements into copy constructor calls on the hidden return variable
     28        void fixReturnStatements( std::list< Declaration * > & translationUnit );
     29
     30        /// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument
     31        ImplicitCtorDtorStmt * genCtorDtor( const std::string & fname, ObjectDecl * objDecl, Expression * arg = nullptr );
    2932
    3033        /// creates an appropriate ConstructorInit node which contains a constructor, destructor, and C-initializer
Note: See TracChangeset for help on using the changeset viewer.