Add support for "pure" function attribute

This commit is contained in:
Guillaume Gomez 2023-07-13 21:43:12 +02:00
parent 3a74f9352f
commit c04a631ea6

View File

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