diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-11-14 01:59:00 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-09-30 19:41:31 +0200 |
| commit | df54d3980b98ddbf29edac4ed4c4affcb021937f (patch) | |
| tree | cf1158c185488d10d4822c0c00c62e7b4a23ef17 /compiler/rustc_codegen_cranelift | |
| parent | 11491938f80988c7261a1179cf71a25c379c8783 (diff) | |
| download | rust-df54d3980b98ddbf29edac4ed4c4affcb021937f.tar.gz rust-df54d3980b98ddbf29edac4ed4c4affcb021937f.zip | |
Move encode_metadata out of CrateStore.
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rwxr-xr-x | compiler/rustc_codegen_cranelift/scripts/filter_profile.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/metadata.rs | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/scripts/filter_profile.rs b/compiler/rustc_codegen_cranelift/scripts/filter_profile.rs index 7a51293f5cd..33814727eb1 100755 --- a/compiler/rustc_codegen_cranelift/scripts/filter_profile.rs +++ b/compiler/rustc_codegen_cranelift/scripts/filter_profile.rs @@ -96,7 +96,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> { stack = &stack[..index + REPORT_SYMBOL_NAMES.len()]; } - const ENCODE_METADATA: &str = "rustc_middle::ty::context::TyCtxt::encode_metadata"; + const ENCODE_METADATA: &str = "rustc_metadata::encode_metadata"; if let Some(index) = stack.find(ENCODE_METADATA) { stack = &stack[..index + ENCODE_METADATA.len()]; } diff --git a/compiler/rustc_codegen_cranelift/src/metadata.rs b/compiler/rustc_codegen_cranelift/src/metadata.rs index 9afa999a87d..7b769dff370 100644 --- a/compiler/rustc_codegen_cranelift/src/metadata.rs +++ b/compiler/rustc_codegen_cranelift/src/metadata.rs @@ -7,7 +7,11 @@ use rustc_middle::middle::cstore::EncodedMetadata; use rustc_middle::ty::TyCtxt; // Adapted from https://github.com/rust-lang/rust/blob/da573206f87b5510de4b0ee1a9c044127e409bd3/src/librustc_codegen_llvm/base.rs#L47-L112 -pub(crate) fn new_metadata_object(tcx: TyCtxt<'_>, cgu_name: &str, metadata: &EncodedMetadata) -> Vec<u8> { +pub(crate) fn new_metadata_object( + tcx: TyCtxt<'_>, + cgu_name: &str, + metadata: &EncodedMetadata, +) -> Vec<u8> { use snap::write::FrameEncoder; use std::io::Write; |
