numba / llvmlite

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

Attaching metadata references to global variables #321

Open syegulalp opened 6 years ago

syegulalp commented 6 years ago

Is this possible in llvmlite? It doesn't appear to be documented, or exposed through the API set for objects like llvmlite.ir.GlobalVariable.

sklam commented 6 years ago

Looks like we didn't add it for GlobalVariable. Looks like it's not too hard to do. Just need to add _HasMetadata and the required attributes to GlobalVariable

john-tornblom commented 3 years ago

See PR https://github.com/numba/llvmlite/pull/760