Use object instead of LLVM for reading bitcode from rlibs
This commit is contained in:
parent
2fdbf075cf
commit
395d564f25
6 changed files with 18 additions and 30 deletions
|
@ -83,17 +83,6 @@ impl<'a> Child<'a> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn data(&self) -> &'a [u8] {
|
||||
unsafe {
|
||||
let mut data_len = 0;
|
||||
let data_ptr = super::LLVMRustArchiveChildData(self.raw, &mut data_len);
|
||||
if data_ptr.is_null() {
|
||||
panic!("failed to read data from archive child");
|
||||
}
|
||||
slice::from_raw_parts(data_ptr as *const u8, data_len as usize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Drop for Child<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue