numba / llvmlite

A lightweight LLVM python binding for writing JIT compilers
https://llvmlite.pydata.org/
BSD 2-Clause "Simplified" License
1.94k stars 322 forks source link

Add convenience func and args #1081

Closed thomaspinckney3 closed 3 weeks ago

thomaspinckney3 commented 2 months ago

I found these helpful in a recent project. Not sure if there is a better way to do this. This is my first pull request so hopefully getting it right!

types.py: add get_element_offset to Type values.py: add packed arg to literal_struct context: add packed arg to get_identified_type tests: add test cases

gmarkall commented 1 month ago

Thanks for the PR! I need to look over the code more closely, but I think the idea of these is good in general.

gmarkall commented 1 month ago

I've added this to the next milestone since it seems like it should be pretty easy to get in before the next release.

gmarkall commented 3 weeks ago

Many thanks for your contribution, @thomaspinckney3! This will be included in the next release of llvmlite (v0.44.0).