Skip to content

Commit 8d18112

Browse files
authored
Merge pull request #45 from rust-lang/feature/fn-abis
Add MsAbi and SysvAbi function attributes
2 parents ac3ffb0 + 6d53a8e commit 8d18112

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gccjit"
3-
version = "2.4.0"
3+
version = "2.5.0"
44
authors = ["Sean Gillespie <[email protected]>", "Antoni Boucher <[email protected]>"]
55
description = "Higher-level Rust bindings for libgccjit."
66
keywords = ["compiler", "jit", "gcc"]
@@ -13,4 +13,4 @@ readme = "README.md"
1313
master = ["gccjit_sys/master"]
1414

1515
[dependencies]
16-
gccjit_sys = { version = "0.5.0", path = "gccjit_sys" }
16+
gccjit_sys = { version = "0.6.0", path = "gccjit_sys" }

gccjit_sys/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gccjit_sys"
3-
version = "0.5.0"
3+
version = "0.6.0"
44
authors = ["Sean Gillespie <[email protected]>", "Antoni Boucher <[email protected]>"]
55
#links = "gccjit"
66
description = "Raw bindings to libgccjit. Companion to the gccjit crate."

gccjit_sys/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ pub enum gcc_jit_fn_attribute
276276
GCC_JIT_FN_ATTRIBUTE_CONST,
277277
GCC_JIT_FN_ATTRIBUTE_WEAK,
278278
GCC_JIT_FN_ATTRIBUTE_NONNULL,
279+
GCC_JIT_FN_ATTRIBUTE_MS_ABI,
280+
GCC_JIT_FN_ATTRIBUTE_SYSV_ABI,
279281
}
280282

281283
#[cfg(feature="master")]

src/function.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ pub enum FnAttribute<'a> {
6060
Const,
6161
Weak,
6262
NonNull(Vec<std::ffi::c_int>),
63+
MsAbi,
64+
SysvAbi,
6365
}
6466

6567
#[cfg(feature="master")]
@@ -76,7 +78,9 @@ impl<'a> FnAttribute<'a> {
7678
| FnAttribute::ReturnsTwice
7779
| FnAttribute::Pure
7880
| FnAttribute::Const
79-
| FnAttribute::Weak => AttributeValue::None,
81+
| FnAttribute::Weak
82+
| FnAttribute::MsAbi
83+
| FnAttribute::SysvAbi => AttributeValue::None,
8084
FnAttribute::NonNull(ref value) => {
8185
debug_assert!(
8286
value.iter().all(|attr| *attr > 0),
@@ -102,6 +106,8 @@ impl<'a> FnAttribute<'a> {
102106
FnAttribute::Const => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_CONST,
103107
FnAttribute::Weak => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_WEAK,
104108
FnAttribute::NonNull(_) => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_NONNULL,
109+
FnAttribute::MsAbi => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_MS_ABI,
110+
FnAttribute::SysvAbi => gccjit_sys::gcc_jit_fn_attribute::GCC_JIT_FN_ATTRIBUTE_SYSV_ABI,
105111
}
106112
}
107113
}

0 commit comments

Comments
 (0)