about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2022-03-20 16:55:21 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-03-20 16:55:21 +0100
commitef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8 (patch)
tree5e6b18b3d26ff3fdf8ed1347edd8eb3b8a234a38 /compiler/rustc_codegen_cranelift/src/compiler_builtins.rs
parentc7ce69faf2a7ea16c15d922985ca27ba70da30ee (diff)
parent370c397ec9169809e5ad270079712e0043514240 (diff)
downloadrust-ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8.tar.gz
rust-ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8.zip
Merge commit '370c397ec9169809e5ad270079712e0043514240' into sync_cg_clif-2022-03-20
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/compiler_builtins.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/compiler_builtins.rs24
1 files changed, 13 insertions, 11 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs b/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs
index 100c3b43160..c6a247cf59e 100644
--- a/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs
+++ b/compiler/rustc_codegen_cranelift/src/compiler_builtins.rs
@@ -1,16 +1,18 @@
-macro builtin_functions($register:ident; $(fn $name:ident($($arg_name:ident: $arg_ty:ty),*) -> $ret_ty:ty;)*) {
-    #[cfg(feature = "jit")]
-    #[allow(improper_ctypes)]
-    extern "C" {
-        $(fn $name($($arg_name: $arg_ty),*) -> $ret_ty;)*
-    }
+macro_rules! builtin_functions {
+    ($register:ident; $(fn $name:ident($($arg_name:ident: $arg_ty:ty),*) -> $ret_ty:ty;)*) => {
+        #[cfg(feature = "jit")]
+        #[allow(improper_ctypes)]
+        extern "C" {
+            $(fn $name($($arg_name: $arg_ty),*) -> $ret_ty;)*
+        }
 
-    #[cfg(feature = "jit")]
-    pub(crate) fn $register(builder: &mut cranelift_jit::JITBuilder) {
-        for (name, val) in [$((stringify!($name), $name as *const u8)),*] {
-            builder.symbol(name, val);
+        #[cfg(feature = "jit")]
+        pub(crate) fn $register(builder: &mut cranelift_jit::JITBuilder) {
+            for (name, val) in [$((stringify!($name), $name as *const u8)),*] {
+                builder.symbol(name, val);
+            }
         }
-    }
+    };
 }
 
 builtin_functions! {