1
Fork 0

Introduce and provide a hook for should_codegen_locally

This commit is contained in:
Mohammad Omidvar 2024-07-15 19:54:47 +00:00
parent d3dd34a1d4
commit 0d508bb0cd
4 changed files with 22 additions and 4 deletions

View file

@ -103,6 +103,10 @@ declare_hooks! {
/// Create a list-like THIR representation for debugging.
hook thir_flat(key: LocalDefId) -> String;
/// Returns `true` if we should codegen an instance in the local crate, or returns `false` if we
/// can just link to the upstream crate and therefore don't need a mono item.
hook should_codegen_locally(instance: crate::ty::Instance<'tcx>) -> bool;
}
#[cold]