diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2021-07-04 18:53:04 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-07-09 22:14:44 +0200 |
| commit | 4560efe46c476cf794fa0ce4efb8db5aa55a3351 (patch) | |
| tree | 945df75cbe56cff80f8e3f0e931a00dc7ce73ae1 /compiler/rustc_codegen_llvm/src/llvm/ffi.rs | |
| parent | 33e9a6b565ddd7f20a5fd3f455eb2f3109d41801 (diff) | |
| download | rust-4560efe46c476cf794fa0ce4efb8db5aa55a3351.tar.gz rust-4560efe46c476cf794fa0ce4efb8db5aa55a3351.zip | |
Pass type when creating load
This makes load generation compatible with opaque pointers. The generation of nontemporal copies still accesses the pointer element type, as fixing this requires more movement.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 3f629220328..2ade66ac41e 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -1385,7 +1385,12 @@ extern "C" { Val: &'a Value, Name: *const c_char, ) -> &'a Value; - pub fn LLVMBuildLoad(B: &Builder<'a>, PointerVal: &'a Value, Name: *const c_char) -> &'a Value; + pub fn LLVMBuildLoad2( + B: &Builder<'a>, + Ty: &'a Type, + PointerVal: &'a Value, + Name: *const c_char, + ) -> &'a Value; pub fn LLVMBuildStore(B: &Builder<'a>, Val: &'a Value, Ptr: &'a Value) -> &'a Value; |
