@@ -159,12 +159,12 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
159159 constraints. push ( format ! ( "{}" , op_idx[ & idx] ) ) ;
160160 }
161161 }
162- InlineAsmOperandRef :: Const { value, ty : _ } => match value {
162+ InlineAsmOperandRef :: Const { value, ty : _, instance : _ } => match value {
163163 ConstScalar :: Int ( _) => ( ) ,
164164 ConstScalar :: Ptr ( ptr, _) => {
165165 let ( prov, _) = ptr. prov_and_relative_offset ( ) ;
166166 let global_alloc = self . tcx . global_alloc ( prov. alloc_id ( ) ) ;
167- let ( value, _) = self . cx . alloc_to_backend ( global_alloc) . unwrap ( ) ;
167+ let ( value, _) = self . cx . alloc_to_backend ( global_alloc, None ) . unwrap ( ) ;
168168 inputs. push ( value) ;
169169 op_idx. insert ( idx, constraints. len ( ) ) ;
170170 constraints. push ( "s" . to_string ( ) ) ;
@@ -212,7 +212,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
212212 template_str. push_str ( & format ! ( "${{{}}}" , op_idx[ & operand_idx] ) ) ;
213213 }
214214 }
215- InlineAsmOperandRef :: Const { value, ty } => {
215+ InlineAsmOperandRef :: Const { value, ty, instance : _ } => {
216216 match value {
217217 ConstScalar :: Int ( int) => {
218218 // Const operands get injected directly into the template
@@ -431,7 +431,7 @@ impl<'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
431431 InlineAsmTemplatePiece :: String ( ref s) => template_str. push_str ( s) ,
432432 InlineAsmTemplatePiece :: Placeholder { operand_idx, modifier : _, span : _ } => {
433433 match operands[ operand_idx] {
434- GlobalAsmOperandRef :: Const { value, ty } => {
434+ GlobalAsmOperandRef :: Const { value, ty, instance } => {
435435 match value {
436436 ConstScalar :: Int ( int) => {
437437 // Const operands get injected directly into the
@@ -448,7 +448,8 @@ impl<'tcx> AsmCodegenMethods<'tcx> for CodegenCx<'_, 'tcx> {
448448 ConstScalar :: Ptr ( ptr, _) => {
449449 let ( prov, offset) = ptr. prov_and_relative_offset ( ) ;
450450 let global_alloc = self . tcx . global_alloc ( prov. alloc_id ( ) ) ;
451- let ( llval, sym) = self . alloc_to_backend ( global_alloc) . unwrap ( ) ;
451+ let ( llval, sym) =
452+ self . alloc_to_backend ( global_alloc, instance) . unwrap ( ) ;
452453 assert ! ( sym. is_some( ) ) ;
453454
454455 self . add_compiler_used_global ( llval) ;
0 commit comments