diff options
| author | bors <bors@rust-lang.org> | 2022-09-12 13:16:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-12 13:16:14 +0000 |
| commit | 7f115e3cd239af753aeb398a114fa321a3ce584b (patch) | |
| tree | 4f941d47b92d9baffa335a306be4a71d9a60b1ac /compiler/rustc_codegen_llvm/src | |
| parent | a93214ec06b57f1eb0cc2fd07e3c4b86b1b1d949 (diff) | |
| parent | 9bf89e72184c4f598360f81cea7612759b560372 (diff) | |
| download | rust-7f115e3cd239af753aeb398a114fa321a3ce584b.tar.gz rust-7f115e3cd239af753aeb398a114fa321a3ce584b.zip | |
Auto merge of #101716 - Dylan-DPC:rollup-ayvh6nd, r=Dylan-DPC
Rollup of 9 pull requests Successful merges: - #100293 (Add inline-llvm option for disabling/enabling LLVM inlining) - #100767 (Remove manual <[u8]>::escape_ascii) - #101668 (Suggest pub instead of public for const type item) - #101671 (Fix naming format of IEEE 754 standard) - #101676 (Check that the types in return position `impl Trait` in traits are well-formed) - #101681 (Deny return-position `impl Trait` in traits for object safety) - #101693 (Update browser UI test 0 10) - #101701 (Rustdoc-Json: Add tests for trait impls.) - #101706 (rustdoc: remove no-op `#search`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index b38684a63e4..eff2436d41c 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -35,6 +35,10 @@ pub fn apply_to_callsite(callsite: &Value, idx: AttributePlace, attrs: &[&Attrib /// Get LLVM attribute for the provided inline heuristic. #[inline] fn inline_attr<'ll>(cx: &CodegenCx<'ll, '_>, inline: InlineAttr) -> Option<&'ll Attribute> { + if !cx.tcx.sess.opts.unstable_opts.inline_llvm { + // disable LLVM inlining + return Some(AttributeKind::NoInline.create_attr(cx.llcx)); + } match inline { InlineAttr::Hint => Some(AttributeKind::InlineHint.create_attr(cx.llcx)), InlineAttr::Always => Some(AttributeKind::AlwaysInline.create_attr(cx.llcx)), |
