Changes in src/SymTab/Autogen.cc [bcda04c:615a096]
- File:
-
- 1 edited
-
src/SymTab/Autogen.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
rbcda04c r615a096 218 218 219 219 /// generates a function (?{}, ?=?, ^?{}) based on the data argument and members. If function is generated, inserts the type into the map. 220 void gen( const FuncData & data , bool concurrent_type) {220 void gen( const FuncData & data ) { 221 221 if ( ! shouldGenerate( data.map, aggregateDecl ) ) return; 222 222 FunctionType * ftype = data.genType( refType ); 223 224 if(concurrent_type && InitTweak::isDestructor( data.fname )) {225 ftype->get_parameters().front()->get_type()->set_mutex( true );226 }227 228 223 cloneAll( typeParams, ftype->get_forall() ); 229 224 *out++ = genFunc( data.fname, ftype, functionNesting ); … … 408 403 auto generator = makeFuncGenerator( aggregateDecl, refType, functionNesting, typeParams, back_inserter( newFuncs ) ); 409 404 for ( const FuncData & d : data ) { 410 generator.gen( d, aggregateDecl->is_thread() || aggregateDecl->is_monitor() ); 411 } 412 405 generator.gen( d ); 406 } 413 407 // field ctors are only generated if default constructor and copy constructor are both generated 414 408 unsigned numCtors = std::count_if( newFuncs.begin(), newFuncs.end(), [](FunctionDecl * dcl) { return InitTweak::isConstructor( dcl->get_name() ); } );
Note:
See TracChangeset
for help on using the changeset viewer.