Closed folded closed 1 week ago
For a record: I guess this PR could be surpassed by #1042?
For a record: I guess this PR could be surpassed by #1042?
Maybe technically, but we won't be able to merge #1042 because it contains the whole LLVM 17 transition in one go, and we need to adopt a more gradual strategy.
Yeah, totally understandable.
Opaque pointers were implemented in #1064 - closing.
Many thanks for this initial work / reference, @folded !
Fix for issue #900
LLVM 14 introduces optional opaque pointers. If opaque pointers are enabled then there is no way to determine the pointee type. LLVM 16 makes this the default.
In llvmlite and numba this is used to determine ABI size and alignment of types by creating a global variable and then asking for its pointee type in order to get a TypeRef. For global variables specifically this can be shortcut via gv->getValueType(), and doing so removes the current issues when opaque pointers are enabled.
This change has been tested with LLVM 11-14 and so also includes some other changes required to make llvmlite compile on those versions.