Skip to content

Commit 3a74f93

Browse files
authored
Merge pull request #301 from GuillaumeGomez/returns-twice
Add support for "returns_twice" function attribute
2 parents e062c2c + a6d1aa2 commit 3a74f93

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/attributes.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
118118
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) {
119119
func.add_attribute(FnAttribute::Cold);
120120
}
121+
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_RETURNS_TWICE) {
122+
func.add_attribute(FnAttribute::ReturnsTwice);
123+
}
121124
}
122125

123126
let function_features =

0 commit comments

Comments
 (0)