Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 745dee9

Browse files
committed
Move encode_metadata out of CrateStore.
1 parent 500e22e commit 745dee9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

scripts/filter_profile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
9696
stack = &stack[..index + REPORT_SYMBOL_NAMES.len()];
9797
}
9898

99-
const ENCODE_METADATA: &str = "rustc_middle::ty::context::TyCtxt::encode_metadata";
99+
const ENCODE_METADATA: &str = "rustc_metadata::encode_metadata";
100100
if let Some(index) = stack.find(ENCODE_METADATA) {
101101
stack = &stack[..index + ENCODE_METADATA.len()];
102102
}

src/metadata.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ use rustc_middle::middle::cstore::EncodedMetadata;
77
use rustc_middle::ty::TyCtxt;
88

99
// Adapted from https://github.com/rust-lang/rust/blob/da573206f87b5510de4b0ee1a9c044127e409bd3/src/librustc_codegen_llvm/base.rs#L47-L112
10-
pub(crate) fn new_metadata_object(tcx: TyCtxt<'_>, cgu_name: &str, metadata: &EncodedMetadata) -> Vec<u8> {
10+
pub(crate) fn new_metadata_object(
11+
tcx: TyCtxt<'_>,
12+
cgu_name: &str,
13+
metadata: &EncodedMetadata,
14+
) -> Vec<u8> {
1115
use snap::write::FrameEncoder;
1216
use std::io::Write;
1317

0 commit comments

Comments
 (0)