Prepare struct_gep for opaque pointers

Imlement struct_gep using LLVMBuildStructGEP2 which takes an explicit
type argument instead of deriving it from a pointer type.
This commit is contained in:
Tomasz Miąsko 2021-08-01 00:00:00 +00:00
parent 87d713ff2b
commit 838042aa4e
6 changed files with 20 additions and 12 deletions

View file

@ -1408,8 +1408,9 @@ extern "C" {
NumIndices: c_uint,
Name: *const c_char,
) -> &'a Value;
pub fn LLVMBuildStructGEP(
pub fn LLVMBuildStructGEP2(
B: &Builder<'a>,
Ty: &'a Type,
Pointer: &'a Value,
Idx: c_uint,
Name: *const c_char,