about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-19 09:23:31 +0000
committerbors <bors@rust-lang.org>2022-12-19 09:23:31 +0000
commit4653c93e4442d88bf3278067183c8fdc0be74a1f (patch)
tree882fb217c4882e6a83e1cf8f385b72fef7328559 /compiler/rustc_codegen_llvm/src
parent10723378900ba2d25fc5d8baf785e1082f385832 (diff)
parent2a57493fa1e3e59a298bec365a6afb3df7ea5e84 (diff)
downloadrust-4653c93e4442d88bf3278067183c8fdc0be74a1f.tar.gz
rust-4653c93e4442d88bf3278067183c8fdc0be74a1f.zip
Auto merge of #105892 - Dylan-DPC:rollup-eozolx4, r=Dylan-DPC
Rollup of 5 pull requests

Successful merges:

 - #105682 (Use `expose_addr()` in `fmt::Pointer`)
 - #105839 (Suggest a `T: Send` bound for `&mut T` upvars in `Send` generators)
 - #105864 (clippy::complexity fixes)
 - #105882 (Don't ICE in closure arg borrow suggestion)
 - #105889 (Fix `uninlined_format_args` in libtest)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 853a8b82853..5bf45a81e43 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -233,8 +233,8 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
         // Set KCFI operand bundle
         let is_indirect_call = unsafe { llvm::LLVMIsAFunction(llfn).is_none() };
         let kcfi_bundle =
-            if self.tcx.sess.is_sanitizer_kcfi_enabled() && fn_abi.is_some() && is_indirect_call {
-                let kcfi_typeid = kcfi_typeid_for_fnabi(self.tcx, fn_abi.unwrap());
+            if self.tcx.sess.is_sanitizer_kcfi_enabled() && let Some(fn_abi) = fn_abi && is_indirect_call {
+                let kcfi_typeid = kcfi_typeid_for_fnabi(self.tcx, fn_abi);
                 Some(llvm::OperandBundleDef::new("kcfi", &[self.const_u32(kcfi_typeid)]))
             } else {
                 None