Merge pull request #301 from GuillaumeGomez/returns-twice
Add support for "returns_twice" function attribute
This commit is contained in:
commit
3a74f9352f
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -77,7 +77,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gccjit"
|
name = "gccjit"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/antoyo/gccjit.rs#79c8bb49ff09b7f40a04055203a5f3894a266210"
|
source = "git+https://github.com/antoyo/gccjit.rs#78ed1a380eb276e7443645a41b0e87222f291e82"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gccjit_sys",
|
"gccjit_sys",
|
||||||
]
|
]
|
||||||
@ -85,7 +85,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "gccjit_sys"
|
name = "gccjit_sys"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
source = "git+https://github.com/antoyo/gccjit.rs#79c8bb49ff09b7f40a04055203a5f3894a266210"
|
source = "git+https://github.com/antoyo/gccjit.rs#78ed1a380eb276e7443645a41b0e87222f291e82"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
@ -118,6 +118,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
|
|||||||
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
|
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
|
||||||
func.add_attribute(FnAttribute::Cold);
|
func.add_attribute(FnAttribute::Cold);
|
||||||
}
|
}
|
||||||
|
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_RETURNS_TWICE) {
|
||||||
|
func.add_attribute(FnAttribute::ReturnsTwice);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let function_features =
|
let function_features =
|
||||||
|
Loading…
Reference in New Issue
Block a user