Introduce and provide a hook for should_codegen_locally
This commit is contained in:
parent
d3dd34a1d4
commit
0d508bb0cd
4 changed files with 22 additions and 4 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue