diff options
| author | Celina G. Val <celinval@amazon.com> | 2024-10-25 01:05:59 -0700 |
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2024-11-07 13:11:46 -0800 |
| commit | 0ce579f6f3a45ed0bab7f2957ea14683e69412f6 (patch) | |
| tree | b423246033a82a3dc12a23d5cf84e78b75cd9256 /compiler/rustc_metadata/src/rmeta/decoder | |
| parent | f61306d47bc98af8bb9d15f1adf6086785590a8c (diff) | |
[StableMIR] API to retrieve definitions from crates
Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, add a query to retrieve the number of defs in a foreign crate.
Diffstat (limited to 'compiler/rustc_metadata/src/rmeta/decoder')
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs index 7bb40996d58..81d93ef2a4f 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs @@ -387,6 +387,7 @@ provide! { tcx, def_id, other, cdata, crate_hash => { cdata.root.header.hash } crate_host_hash => { cdata.host_hash } crate_name => { cdata.root.header.name } + num_extern_def_ids => { cdata.num_def_ids() } extra_filename => { cdata.root.extra_filename.clone() } |
