diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-03-18 18:47:41 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2024-03-20 23:36:05 -0400 |
| commit | 2f6fb234de5a12fd314ec91737c1f3079f023d8c (patch) | |
| tree | 2ebe3f58f89687baf3f59e9cf5f2f7818e5656ed /compiler/rustc_codegen_ssa/src | |
| parent | 82717ab877099db6854c6176de90943c14393f6d (diff) | |
Add a test
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 09286a8ed24..8fd84d8c053 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -1693,11 +1693,15 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { self.set_debug_loc(&mut bx, mir::SourceInfo::outermost(self.mir.span)); - let (fn_abi, fn_ptr, _instance) = common::build_langcall(&bx, None, reason.lang_item()); - let fn_ty = bx.fn_decl_backend_type(fn_abi); + let (fn_abi, fn_ptr, instance) = common::build_langcall(&bx, None, reason.lang_item()); + if is_call_from_compiler_builtins_to_upstream_monomorphization(bx.tcx(), instance) { + bx.abort(); + } else { + let fn_ty = bx.fn_decl_backend_type(fn_abi); - let llret = bx.call(fn_ty, None, Some(fn_abi), fn_ptr, &[], funclet.as_ref()); - bx.apply_attrs_to_cleanup_callsite(llret); + let llret = bx.call(fn_ty, None, Some(fn_abi), fn_ptr, &[], funclet.as_ref()); + bx.apply_attrs_to_cleanup_callsite(llret); + } bx.unreachable(); |
