Skip to content

Declare enums as LLVM named structs #2221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brson opened this issue Apr 16, 2012 · 7 comments
Closed

Declare enums as LLVM named structs #2221

brson opened this issue Apr 16, 2012 · 7 comments
Assignees
Milestone

Comments

@brson
Copy link
Contributor

brson commented Apr 16, 2012

Our new GC infrastructure will need to distinguish enum types so we should name them. They will still just be structs of i8s.

@ghost ghost assigned brson Apr 16, 2012
@nikomatsakis
Copy link
Contributor

Can we please fix their representation as well at the same? Now that we've
monomorphized this should be easy. Actually, I even have the code lying
around in some repo or other---what stymied me was the dynamic case. I
guess I ought to dust it off and bring it in.

@brson
Copy link
Contributor Author

brson commented Apr 18, 2012

This seems to require coming up with a canonical name for enums defined in external crates. Is there any other feature that does this in trans? @nikomatsakis I know you ran into a related issue during, I think, printing paths in error messages.

@brson
Copy link
Contributor Author

brson commented Apr 18, 2012

I think I will just use the full path to the enum, from the perspective of whichever crate it is defined in, and tack on :: plus the crate number. Sounds unique to me.

@nikomatsakis
Copy link
Contributor

I never came up with a good solution.

@brson
Copy link
Contributor Author

brson commented Apr 25, 2012

Fixed by 6e909e3. Addressing alignment in #1645.

@brson brson closed this as completed Apr 25, 2012
@brson brson reopened this Apr 25, 2012
@brson
Copy link
Contributor Author

brson commented Apr 25, 2012

Reverted because it broke rust-zmq

@brson
Copy link
Contributor Author

brson commented Apr 25, 2012

Fixed by df0ef52

@brson brson closed this as completed Apr 25, 2012
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
…r=RalfJung

Freebsd-target-support

Implement freebsd as a target for miri
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
BoxyUwU pushed a commit to BoxyUwU/rust that referenced this issue Jan 29, 2025
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

No branches or pull requests

2 participants