Skip to content

Commit 918332b

Browse files
Add support for "ffi_const" function attribute
1 parent 57d2ecb commit 918332b

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
@@ -124,6 +124,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
124124
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_PURE) {
125125
func.add_attribute(FnAttribute::Pure);
126126
}
127+
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_CONST) {
128+
func.add_attribute(FnAttribute::Const);
129+
}
127130
}
128131

129132
let function_features =

0 commit comments

Comments
 (0)