Skip to content
Permalink
Browse files

format a bit

  • Loading branch information...
RalfJung committed Jun 24, 2019
1 parent f5b3021 commit 076a5cdc357a3a9e03850a745bee0b3f0db3d54f
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/librustc_codegen_llvm/metadata.rs
@@ -69,11 +69,13 @@ fn search_meta_section<'a>(of: &'a ObjectFile,
let mut name_buf = None;
let name_len = llvm::LLVMRustGetSectionName(si.llsi, &mut name_buf);
let name = name_buf.map_or(
"".to_string(),
String::new(), // We got a NULL ptr, ignore `name_len`.
|buf| String::from_utf8(
slice::from_raw_parts(buf.as_ptr() as *const u8,
name_len as usize)
.to_vec()).unwrap());
.to_vec()
).unwrap()
);
debug!("get_metadata_section: name {}", name);
if read_metadata_section_name(target) == name {
let cbuf = llvm::LLVMGetSectionContents(si.llsi);

0 comments on commit 076a5cd

Please sign in to comment.
You can’t perform that action at this time.