Share part of the global_asm!() implementation between cg_ssa and cg_clif

This commit is contained in:
bjorn3
2024-12-13 10:01:09 +00:00
parent f5c93fa3fe
commit 3066da813b
4 changed files with 73 additions and 138 deletions

View File

@@ -570,7 +570,10 @@ fn codegen_cgu_content(
}
}
MonoItem::GlobalAsm(item_id) => {
crate::global_asm::codegen_global_asm_item(tcx, &mut cx.global_asm, item_id);
rustc_codegen_ssa::base::codegen_global_asm(
&mut GlobalAsmContext { tcx, global_asm: &mut cx.global_asm },
item_id,
);
}
}
}