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