Changeset 44940ee for src/Validate/Autogen.cpp
- Timestamp:
- Feb 25, 2026, 12:56:30 AM (33 hours ago)
- Branches:
- stuck-waitfor-destruct
- Children:
- 88bb0b4
- Parents:
- a0548c2
- File:
-
- 1 edited
-
src/Validate/Autogen.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/Autogen.cpp
ra0548c2 r44940ee 402 402 } 403 403 404 return genProto( "^?{}", { dst }, {} ); 404 ast::FunctionDecl * decl = genProto( "^?{}", { dst }, {} ); 405 // For concurrent types, remove static storage and inline specifier, and add 406 // cfa_linkonce attribute so the destructor has external linkage with linkonce 407 // semantics. This is required for waitfor to work correctly across translation 408 // units - the function pointer must be the same everywhere, and cfa_linkonce 409 // ensures only one definition survives linking. 410 if ( isConcurrentType() ) { 411 auto mut = ast::mutate( decl ); 412 mut->storage = ast::Storage::Classes(); 413 mut->funcSpec = ast::Function::Specs(); 414 mut->attributes.push_back( new ast::Attribute( "cfa_linkonce" ) ); 415 } 416 return decl; 405 417 } 406 418
Note:
See TracChangeset
for help on using the changeset viewer.