TheDan64 / inkwell

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

Provide a `Context` method to construct `ArrayType` and `FunctionType` #511

Open vaivaswatha opened 1 week ago

vaivaswatha commented 1 week ago

inkwell::context::Context has methods to construct most other types, except vector, array and function types. Providing methods for these would be useful. Currently I see no other way of constructing an ArrayType, except match over every possible type for the element type, and call array_type on that. That's quite tedious.

vaivaswatha commented 1 week ago

I just realised that we can build ArrayType and FunctionType from a BasicTypeEnum, so this isn't that important. But it would be a nice to have. Please close the Issue if you think we don't need it.