about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/context.rs
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-08-18 22:21:53 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-08-21 05:27:14 +0400
commit92b05db7619fb02f2265ffca42d2aa8d78646d7d (patch)
treee99f088d49c7a973344e2f5929ece2ead5c5e3ca /compiler/rustc_codegen_llvm/src/context.rs
parent55ba58cadbd9d8e6c850491080ea7a77cd5e194d (diff)
downloadrust-92b05db7619fb02f2265ffca42d2aa8d78646d7d.tar.gz
rust-92b05db7619fb02f2265ffca42d2aa8d78646d7d.zip
Do not use void pointer for `ptr_mask` intrinsic
I couldn't find where exactly it's documented, but apperantly pointers to void
type are invalid in llvm - void is only allowed as a return type of functions.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index bbb6bacc452..67ffc7cb951 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -644,7 +644,6 @@ impl<'ll> CodegenCx<'ll, '_> {
 
         let i8p = self.type_i8p();
         let void = self.type_void();
-        let voidp = self.type_ptr_to(void);
         let i1 = self.type_i1();
         let t_i8 = self.type_i8();
         let t_i16 = self.type_i16();
@@ -888,7 +887,7 @@ impl<'ll> CodegenCx<'ll, '_> {
             ifn!("llvm.dbg.value", fn(t_metadata, t_i64, t_metadata) -> void);
         }
 
-        ifn!("llvm.ptrmask", fn(voidp, t_isize) -> voidp);
+        ifn!("llvm.ptrmask", fn(i8p, t_isize) -> i8p);
 
         None
     }