Changeset a165495
- Timestamp:
- Feb 7, 2026, 1:40:26 PM (9 hours ago)
- Branches:
- stuck-waitfor-destruct
- Children:
- c7d106a
- Parents:
- 3151bc09
- git-author:
- Matthew Au-Yeung <mw2auyeu@…> (01/27/26 19:12:37)
- git-committer:
- Matthew Au-Yeung <mw2auyeu@…> (02/07/26 13:40:26)
- File:
-
- 1 edited
-
src/Validate/Autogen.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/Autogen.cpp
r3151bc09 ra165495 401 401 add_qualifiers( dst->type, ast::CV::Qualifiers( ast::CV::Mutex ) ); 402 402 } 403 return genProto( "^?{}", { dst }, {} ); 403 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; 404 417 } 405 418
Note:
See TracChangeset
for help on using the changeset viewer.