C++20 modules require emission of an initializer function, which is called by importers of the module. This implements the mangling for that function. It is the one place the ABI exposes partition names in symbols -- but fortunately only needed by other TUs of that same module.
Details
- Reviewers
iains bruno - Group Reviewers
Restricted Project - Commits
- rGa1dcfb75ea8c: [clang] Module global init mangling
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/AST/ItaniumMangle.cpp | ||
---|---|---|
6545 | Can you add a brief comment on what _ZGI means? LGTM with that change. |
(in initial testing) it seems that in the places we need to make the global initialisers, the mangling context is not Itanium-specific (although, presumably I could make the module initialiser conditional on that).
Do we know if there's a plan to implement the MS-specific mangling? (for now, I've hacked around this with a nonsensical implementation for MS in order to make progress on testing the initialiser code).
Do we know if there's a plan to implement the MS-specific mangling? (for now, I've hacked around this with a nonsensical implementation for MS in order to make progress on testing the initialiser code).
I'll ask Microsoft what that mangling is.
I have revised my code (which I suspect will be the first user of this) to use the patch here as-is, so this LGTM (and we can add mangling for Microsoft at a later time).
Can you add a brief comment on what _ZGI means? LGTM with that change.