mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 09:53:26 +00:00
Merge pull request #305 from GuillaumeGomez/pure-attr
Add support for "pure" function attribute
This commit is contained in:
commit
57d2ecb14e
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -77,7 +77,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gccjit"
|
||||
version = "1.0.0"
|
||||
source = "git+https://github.com/antoyo/gccjit.rs#78ed1a380eb276e7443645a41b0e87222f291e82"
|
||||
source = "git+https://github.com/antoyo/gccjit.rs#de70a3bdc1908098ae4b10efc530bd695971a67c"
|
||||
dependencies = [
|
||||
"gccjit_sys",
|
||||
]
|
||||
@ -85,7 +85,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "gccjit_sys"
|
||||
version = "0.0.1"
|
||||
source = "git+https://github.com/antoyo/gccjit.rs#78ed1a380eb276e7443645a41b0e87222f291e82"
|
||||
source = "git+https://github.com/antoyo/gccjit.rs#de70a3bdc1908098ae4b10efc530bd695971a67c"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
@ -121,6 +121,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
|
||||
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_RETURNS_TWICE) {
|
||||
func.add_attribute(FnAttribute::ReturnsTwice);
|
||||
}
|
||||
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_PURE) {
|
||||
func.add_attribute(FnAttribute::Pure);
|
||||
}
|
||||
}
|
||||
|
||||
let function_features =
|
||||
|
Loading…
Reference in New Issue
Block a user