diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-12-03 18:27:43 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-12-03 18:27:43 +0000 |
| commit | b2e0db93e7befa23eacb42a121f64c1eb659e8bb (patch) | |
| tree | 5283a50ed85b282a21bd3f7d433e1d7dbd120374 /compiler/rustc_codegen_llvm/src | |
| parent | fff6296b62008d89edfbf9d4afd2496b53d7d2cd (diff) | |
| download | rust-b2e0db93e7befa23eacb42a121f64c1eb659e8bb.tar.gz rust-b2e0db93e7befa23eacb42a121f64c1eb659e8bb.zip | |
Directly return loaded value from type_checked_load
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/intrinsic.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs index 2f5dd519b26..907517bf6ce 100644 --- a/compiler/rustc_codegen_llvm/src/intrinsic.rs +++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs @@ -424,7 +424,9 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> { typeid: &'ll Value, ) -> Self::Value { let vtable_byte_offset = self.const_i32(vtable_byte_offset as i32); - self.call_intrinsic("llvm.type.checked.load", &[llvtable, vtable_byte_offset, typeid]) + let type_checked_load = + self.call_intrinsic("llvm.type.checked.load", &[llvtable, vtable_byte_offset, typeid]); + self.extract_value(type_checked_load, 0) } fn va_start(&mut self, va_list: &'ll Value) -> &'ll Value { |
