Skip to content

Conversation

@Jezurko
Copy link

@Jezurko Jezurko commented Jun 2, 2025

Backporting:
llvm#133176
llvm#132840

…lvm#133176)

Currently only ctor/dtor list and their priorities are supported. This
PR adds support for the missing data field.

Few implementation notes:
- The assembly printer has a fixed form because previous `attr_dict`
will sort the dict by key name, making global_dtor and global_ctor
differ in the order of printed arguments.
- LLVM's `ptr null` is being converted to `#llvm.zero` otherwise we'd
have to create a region to use the default operation conversion from
`ptr null`, which is silly given that the field only support null or a
symbol.
I missed this when originally introduced the feature (note the verifier
message already contains it), this fixes a small bug.
@Jezurko Jezurko requested a review from ekilmer June 2, 2025 16:07
@Jezurko Jezurko self-assigned this Jun 2, 2025
Copy link
Collaborator

@ekilmer ekilmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the issue I was having. Thank you!

@Jezurko Jezurko merged commit 6d85777 into main Jun 3, 2025
7 checks passed
@ekilmer ekilmer deleted the robert/backport-global-tors-and-alias-linkage branch June 12, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants