about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2025-07-21 14:16:43 -0400
committerAntoni Boucher <bouanto@zoho.com>2025-07-21 14:23:04 -0400
commitc1be95ca0c2be04060da7a01f6892e5e6f2ef9dc (patch)
tree9a3932eadd5d56fa4c188739041f387465175353 /src
parentda63add400ef87155b1a665b89b013150ddc23ec (diff)
downloadrust-c1be95ca0c2be04060da7a01f6892e5e6f2ef9dc.tar.gz
rust-c1be95ca0c2be04060da7a01f6892e5e6f2ef9dc.zip
Add missing inline attribute
Diffstat (limited to 'src')
-rw-r--r--src/allocator.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/allocator.rs b/src/allocator.rs
index 0d8dc93274f..66258390d90 100644
--- a/src/allocator.rs
+++ b/src/allocator.rs
@@ -99,11 +99,14 @@ fn create_const_value_function(
     let func = context.new_function(None, FunctionType::Exported, output, &[], name, false);
 
     #[cfg(feature = "master")]
-    func.add_attribute(FnAttribute::Visibility(symbol_visibility_to_gcc(
-        tcx.sess.default_visibility(),
-    )));
+    {
+        func.add_attribute(FnAttribute::Visibility(symbol_visibility_to_gcc(
+            tcx.sess.default_visibility(),
+        )));
 
-    func.add_attribute(FnAttribute::AlwaysInline);
+        func.add_attribute(FnAttribute::AlwaysInline);
+        func.add_attribute(FnAttribute::Inline);
+    }
 
     if tcx.sess.must_emit_unwind_tables() {
         // TODO(antoyo): emit unwind tables.