@@ -103,11 +103,12 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
103103 // be exported from the main codegen unit and may thus be unreachable from the
104104 // object file created by an external assembler.
105105 let wrapper_name = format ! (
106- "__inline_asm_{}_wrapper_n{}" ,
106+ "{}__inline_asm_{}_wrapper_n{}" ,
107+ fx. symbol_name,
107108 fx. cx. cgu_name. as_str( ) . replace( '.' , "__" ) . replace( '-' , "_" ) ,
108- fx. cx . inline_asm_index
109+ fx. inline_asm_index,
109110 ) ;
110- fx. cx . inline_asm_index += 1 ;
111+ fx. inline_asm_index += 1 ;
111112 let sig =
112113 get_function_sig ( fx. tcx , fx. target_config . default_call_conv , instance) ;
113114 create_wrapper_function ( fx. module , sig, & wrapper_name, symbol. name ) ;
@@ -166,11 +167,12 @@ pub(crate) fn codegen_inline_asm_inner<'tcx>(
166167 asm_gen. allocate_stack_slots ( ) ;
167168
168169 let asm_name = format ! (
169- "__inline_asm_{}_n{}" ,
170+ "{}__inline_asm_{}_n{}" ,
171+ fx. symbol_name,
170172 fx. cx. cgu_name. as_str( ) . replace( '.' , "__" ) . replace( '-' , "_" ) ,
171- fx. cx . inline_asm_index
173+ fx. inline_asm_index,
172174 ) ;
173- fx. cx . inline_asm_index += 1 ;
175+ fx. inline_asm_index += 1 ;
174176
175177 let generated_asm = asm_gen. generate_asm_wrapper ( & asm_name) ;
176178 fx. cx . global_asm . push_str ( & generated_asm) ;
0 commit comments