diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-08-01 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-08-04 15:51:30 +0200 |
| commit | 838042aa4e9f7b313cd79420d7613dc5af5343e5 (patch) | |
| tree | ff64a23593b07c0d2a675b5b29e08a21acdd418d /compiler/rustc_codegen_llvm/src/llvm | |
| parent | 87d713ff2b000e3827ebb8be974b280188fac783 (diff) | |
| download | rust-838042aa4e9f7b313cd79420d7613dc5af5343e5.tar.gz rust-838042aa4e9f7b313cd79420d7613dc5af5343e5.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 68d566cca09..c0c9a2183d3 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -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, |
