Ignore:
Timestamp:
Feb 25, 2026, 12:56:30 AM (33 hours ago)
Author:
Matthew Au-Yeung <mw2auyeu@…>
Branches:
stuck-waitfor-destruct
Children:
88bb0b4
Parents:
a0548c2
Message:

Revert "Add a generated hash to fix stuck waitfor comparing static inline mutex destructors"

This reverts commit a30fceb1a73c4ef2bbee39a2b5406da881f51111.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Validate/Autogen.cpp

    ra0548c2 r44940ee  
    402402        }
    403403
    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;
    405417}
    406418
Note: See TracChangeset for help on using the changeset viewer.