Skip to content

Commit c04a631

Browse files
Add support for "pure" function attribute
1 parent 3a74f93 commit c04a631

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/attributes.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
121121
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_RETURNS_TWICE) {
122122
func.add_attribute(FnAttribute::ReturnsTwice);
123123
}
124+
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_PURE) {
125+
func.add_attribute(FnAttribute::Pure);
126+
}
124127
}
125128

126129
let function_features =

0 commit comments

Comments
 (0)