Add support for "ffi_const" function attribute

This commit is contained in:
Guillaume Gomez 2023-07-21 11:23:41 +02:00
parent 57d2ecb14e
commit 918332bea2

View File

@ -124,6 +124,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_PURE) {
func.add_attribute(FnAttribute::Pure);
}
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_CONST) {
func.add_attribute(FnAttribute::Const);
}
}
let function_features =