about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-07-31 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2021-08-04 15:51:30 +0200
commit4013e094f59109779f1294adad96caa2eebf7e2d (patch)
tree2e19a388b0e70c1ce55128e62dd45827ad8ec5a3 /compiler/rustc_codegen_llvm/src/llvm/ffi.rs
parent838042aa4e9f7b313cd79420d7613dc5af5343e5 (diff)
downloadrust-4013e094f59109779f1294adad96caa2eebf7e2d.tar.gz
rust-4013e094f59109779f1294adad96caa2eebf7e2d.zip
Prepare gep for opaque pointers
Implement gep using LLVMBuildGEP2 which takes an explicit type argument
instead of deriving it from a pointer type.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs3
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 c0c9a2183d3..78c7410e682 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -1394,8 +1394,9 @@ extern "C" {
 
     pub fn LLVMBuildStore(B: &Builder<'a>, Val: &'a Value, Ptr: &'a Value) -> &'a Value;
 
-    pub fn LLVMBuildGEP(
+    pub fn LLVMBuildGEP2(
         B: &Builder<'a>,
+        Ty: &'a Type,
         Pointer: &'a Value,
         Indices: *const &'a Value,
         NumIndices: c_uint,