diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-10-31 14:23:38 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-11-09 17:55:39 +0000 |
| commit | 8e9bbc899c7a1913ff04d9af516efee900aeffd1 (patch) | |
| tree | ffae6ca1f59575e32ac1f07bef1ba77966952899 /compiler/rustc_middle/src/hooks | |
| parent | bec24a25cd61c5d252701b9119e4fe887b274937 (diff) | |
| download | rust-8e9bbc899c7a1913ff04d9af516efee900aeffd1.tar.gz rust-8e9bbc899c7a1913ff04d9af516efee900aeffd1.zip | |
Move some code from Compiler::enter to GlobalCtxt::finish
Diffstat (limited to 'compiler/rustc_middle/src/hooks')
| -rw-r--r-- | compiler/rustc_middle/src/hooks/mod.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/hooks/mod.rs b/compiler/rustc_middle/src/hooks/mod.rs index 742797fdeef..92fa64b0987 100644 --- a/compiler/rustc_middle/src/hooks/mod.rs +++ b/compiler/rustc_middle/src/hooks/mod.rs @@ -108,6 +108,19 @@ declare_hooks! { /// 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; + + hook alloc_self_profile_query_strings() -> (); + + /// Saves and writes the DepGraph to the file system. + /// + /// This function saves both the dep-graph and the query result cache, + /// and drops the result cache. + /// + /// This function should only run after all queries have completed. + /// Trying to execute a query afterwards would attempt to read the result cache we just dropped. + hook save_dep_graph() -> (); + + hook query_key_hash_verify_all() -> (); } #[cold] |
