diff options
| author | bors <bors@rust-lang.org> | 2024-07-16 05:46:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-16 05:46:31 +0000 |
| commit | 451035fff364e81cc63d15bd475da8ba32e01470 (patch) | |
| tree | b24a14bb4f49de11c1ed351b24910d00a32f4a95 /compiler/rustc_codegen_llvm/src/attributes.rs | |
| parent | e90f04731a382a27962a30113f8283a59a6ab87e (diff) | |
| parent | 547ade539c578c8a39b02841c3ef4ae980f5c658 (diff) | |
| download | rust-451035fff364e81cc63d15bd475da8ba32e01470.tar.gz rust-451035fff364e81cc63d15bd475da8ba32e01470.zip | |
Auto merge of #3751 - rust-lang:rustup-2024-07-16, r=RalfJung
Automatic Rustup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index cd82894af18..e7669470026 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -6,7 +6,6 @@ use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, PatchableFuncti use rustc_middle::ty::{self, TyCtxt}; use rustc_session::config::{FunctionReturn, OptLevel}; use rustc_span::symbol::sym; -use rustc_target::spec::abi::Abi; use rustc_target::spec::{FramePointer, SanitizerSet, StackProbeType, StackProtector}; use smallvec::SmallVec; @@ -482,7 +481,7 @@ pub fn from_fn_attrs<'ll, 'tcx>( return; } - let mut function_features = function_features + let function_features = function_features .iter() .flat_map(|feat| { llvm_util::to_llvm_features(cx.tcx.sess, feat).into_iter().map(|f| format!("+{f}")) @@ -504,17 +503,6 @@ pub fn from_fn_attrs<'ll, 'tcx>( let name = name.as_str(); to_add.push(llvm::CreateAttrStringValue(cx.llcx, "wasm-import-name", name)); } - - // The `"wasm"` abi on wasm targets automatically enables the - // `+multivalue` feature because the purpose of the wasm abi is to match - // the WebAssembly specification, which has this feature. This won't be - // needed when LLVM enables this `multivalue` feature by default. - if !cx.tcx.is_closure_like(instance.def_id()) { - let abi = cx.tcx.fn_sig(instance.def_id()).skip_binder().abi(); - if abi == Abi::Wasm { - function_features.push("+multivalue".to_string()); - } - } } let global_features = cx.tcx.global_backend_features(()).iter().map(|s| s.as_str()); |
