about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/traits
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-08-01 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2021-08-04 15:51:30 +0200
commit838042aa4e9f7b313cd79420d7613dc5af5343e5 (patch)
treeff64a23593b07c0d2a675b5b29e08a21acdd418d /compiler/rustc_codegen_ssa/src/traits
parent87d713ff2b000e3827ebb8be974b280188fac783 (diff)
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_ssa/src/traits')
-rw-r--r--compiler/rustc_codegen_ssa/src/traits/builder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/builder.rs b/compiler/rustc_codegen_ssa/src/traits/builder.rs
index f0c232a97bc..6c3f52b1b19 100644
--- a/compiler/rustc_codegen_ssa/src/traits/builder.rs
+++ b/compiler/rustc_codegen_ssa/src/traits/builder.rs
@@ -178,7 +178,7 @@ pub trait BuilderMethods<'a, 'tcx>:
 
     fn gep(&mut self, ptr: Self::Value, indices: &[Self::Value]) -> Self::Value;
     fn inbounds_gep(&mut self, ptr: Self::Value, indices: &[Self::Value]) -> Self::Value;
-    fn struct_gep(&mut self, ptr: Self::Value, idx: u64) -> Self::Value;
+    fn struct_gep(&mut self, ty: Self::Type, ptr: Self::Value, idx: u64) -> Self::Value;
 
     fn trunc(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
     fn sext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;