Skip to content

Commit

Permalink
Merge pull request rust-lang#301 from GuillaumeGomez/returns-twice
Browse files Browse the repository at this point in the history
Add support for "returns_twice" function attribute
  • Loading branch information
antoyo authored Jul 13, 2023
2 parents e062c2c + a6d1aa2 commit 3a74f93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
func.add_attribute(FnAttribute::Cold);
}
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_RETURNS_TWICE) {
func.add_attribute(FnAttribute::ReturnsTwice);
}
}

let function_features =
Expand Down

0 comments on commit 3a74f93

Please sign in to comment.