TheDan64 / inkwell

It's a New Kind of Wrapper for Exposing LLVM (Safely)
https://thedan64.github.io/inkwell/
Apache License 2.0
2.38k stars 229 forks source link

Const struct member access #450

Closed tfzee closed 12 months ago

tfzee commented 1 year ago

Is your feature request related to a problem? Please describe. Cant access safely the members of a constant StructValue

Describe the solution you'd like Add get_field_at_index and count_fields to StructValue mirroring the same functions on StructType.

Describe possible drawbacks to your solution None

Describe alternatives you've considered None

Additional context None

tfzee commented 1 year ago

https://github.com/TheDan64/inkwell/pull/451 This would be my straightforward solution for this.