@@ -2,7 +2,8 @@ use gccjit::{LValue, RValue, ToRValue, Type};
22use rustc_abi:: Primitive :: Pointer ;
33use rustc_abi:: { self as abi, HasDataLayout } ;
44use rustc_codegen_ssa:: traits:: {
5- BaseTypeCodegenMethods , ConstCodegenMethods , MiscCodegenMethods , StaticCodegenMethods ,
5+ BaseTypeCodegenMethods , ConstCodegenMethods , MiscCodegenMethods , PacMetadata ,
6+ StaticCodegenMethods ,
67} ;
78use rustc_middle:: mir:: Mutability ;
89use rustc_middle:: mir:: interpret:: { GlobalAlloc , PointerArithmetic , Scalar } ;
@@ -229,7 +230,13 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> {
229230 None
230231 }
231232
232- fn scalar_to_backend ( & self , cv : Scalar , layout : abi:: Scalar , ty : Type < ' gcc > ) -> RValue < ' gcc > {
233+ fn scalar_to_backend_with_pac (
234+ & self ,
235+ cv : Scalar ,
236+ layout : abi:: Scalar ,
237+ ty : Type < ' gcc > ,
238+ _pac : Option < PacMetadata > ,
239+ ) -> RValue < ' gcc > {
233240 let bitsize = if layout. is_bool ( ) { 1 } else { layout. size ( self ) . bits ( ) } ;
234241 match cv {
235242 Scalar :: Int ( int) => {
@@ -278,7 +285,7 @@ impl<'gcc, 'tcx> ConstCodegenMethods for CodegenCx<'gcc, 'tcx> {
278285 }
279286 value
280287 }
281- GlobalAlloc :: Function { instance, .. } => self . get_fn_addr ( instance) ,
288+ GlobalAlloc :: Function { instance, .. } => self . get_fn_addr ( instance, None ) ,
282289 GlobalAlloc :: VTable ( ty, dyn_ty) => {
283290 let alloc = self
284291 . tcx
0 commit comments