Move encode_metadata out of CrateStore.
This commit is contained in:
parent
11491938f8
commit
df54d3980b
9 changed files with 14 additions and 21 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue