Skip to content

Conversation

smeenai
Copy link
Collaborator

@smeenai smeenai commented Dec 3, 2024

Default assignment operator generation was failing because of memcpy
generation for fields being unsupported. Implement it following
CodeGen's example, as usual. Follow-ups will avoid emitting memcpys for
fields of trivial class types, and extend this to copy constructors as
well.

Fixes #1128

[ghstack-poisoned]
@smeenai
Copy link
Collaborator Author

smeenai commented Dec 3, 2024

@smeenai
Copy link
Collaborator Author

smeenai commented Dec 3, 2024

@bcardosolopes heads up that this is a stack. Merging this PR (the base of the stack) will work as normal, but then I'll need to do some adjustments to be able to merge the others.

@smeenai smeenai merged commit baad05f into main Dec 3, 2024
7 checks passed
@smeenai smeenai deleted the users/smeenai/1/head branch December 3, 2024 19:11
lanza pushed a commit that referenced this pull request Mar 18, 2025
Default assignment operator generation was failing because of memcpy
generation for fields being unsupported. Implement it following
CodeGen's example, as usual. Follow-ups will avoid emitting memcpys for
fields of trivial class types, and extend this to copy constructors as
well.

Fixes #1128
terapines-osc-cir pushed a commit to Terapines/clangir that referenced this pull request Sep 2, 2025
Default assignment operator generation was failing because of memcpy
generation for fields being unsupported. Implement it following
CodeGen's example, as usual. Follow-ups will avoid emitting memcpys for
fields of trivial class types, and extend this to copy constructors as
well.

Fixes llvm#1128
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.

We can't copy trivial structs
2 participants