diff --git a/src/attributes.rs b/src/attributes.rs index 0fda9e7ae50..6195de912d2 100644 --- a/src/attributes.rs +++ b/src/attributes.rs @@ -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 =