Ignore:
Timestamp:
Nov 14, 2023, 12:19:09 PM (23 months ago)
Author:
caparson <caparson@…>
Branches:
master
Children:
1ccae59, 89a8bab
Parents:
df8ba61a (diff), 5625427 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/GenInit.h

    rdf8ba61a r8d182b1  
    2222#include "Common/CodeLocation.h"
    2323#include "GenPoly/ScopedSet.h" // for ScopedSet
    24 #include "SynTree/SynTree.h"   // for Visitor Nodes
    2524
    2625namespace InitTweak {
    2726        /// Adds return value temporaries and wraps Initializers in ConstructorInit nodes
    28         void genInit( std::list< Declaration * > & translationUnit );
    2927        void genInit( ast::TranslationUnit & translationUnit );
    3028
    3129        /// Converts return statements into copy constructor calls on the hidden return variable.
    3230        /// This pass must happen before auto-gen.
    33         void fixReturnStatements( std::list< Declaration * > & translationUnit );
    3431        void fixReturnStatements( ast::TranslationUnit & translationUnit );
    3532
    3633        /// generates a single ctor/dtor statement using objDecl as the 'this' parameter and arg as the optional argument
    37         ImplicitCtorDtorStmt * genCtorDtor( const std::string & fname, ObjectDecl * objDecl, Expression * arg = nullptr );
    3834        ast::ptr<ast::Stmt> genCtorDtor (const CodeLocation & loc, const std::string & fname, const ast::ObjectDecl * objDecl, const ast::Expr * arg = nullptr);
    3935
    4036        /// creates an appropriate ConstructorInit node which contains a constructor, destructor, and C-initializer
    41         ConstructorInit * genCtorInit( ObjectDecl * objDecl );
    4237        ast::ConstructorInit * genCtorInit( const CodeLocation & loc, const ast::ObjectDecl * objDecl );
    4338
    44         class ManagedTypes {
    45         public:
    46                 bool isManaged( ObjectDecl * objDecl ) const ; // determine if object is managed
    47                 bool isManaged( Type * type ) const; // determine if type is managed
    48 
    49                 void handleDWT( DeclarationWithType * dwt ); // add type to managed if ctor/dtor
    50                 void handleStruct( StructDecl * aggregateDecl ); // add type to managed if child is managed
    51 
    52                 void beginScope();
    53                 void endScope();
    54         private:
    55                 GenPoly::ScopedSet< std::string > managedTypes;
    56         };
    57 
    58         class ManagedTypes_new {
     39        class ManagedTypes final {
    5940        public:
    6041                bool isManaged( const ast::ObjectDecl * objDecl ) const ; // determine if object is managed
Note: See TracChangeset for help on using the changeset viewer.