rustc_codegen_llvm: remove #![allow(dead_code)] from llvm.
This commit is contained in:
parent
50d764298e
commit
1da26707d6
@ -25,8 +25,8 @@ pub struct ArchiveRO {
|
||||
unsafe impl Send for ArchiveRO {}
|
||||
|
||||
pub struct Iter<'a> {
|
||||
archive: &'a ArchiveRO,
|
||||
ptr: super::ArchiveIteratorRef,
|
||||
_data: marker::PhantomData<&'a ArchiveRO>,
|
||||
}
|
||||
|
||||
pub struct Child<'a> {
|
||||
@ -73,7 +73,7 @@ impl ArchiveRO {
|
||||
unsafe {
|
||||
Iter {
|
||||
ptr: super::LLVMRustArchiveIteratorNew(self.ptr),
|
||||
archive: self,
|
||||
_data: marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -392,8 +392,6 @@ extern { pub type PassManagerBuilder_opaque; }
|
||||
pub type PassManagerBuilderRef = *mut PassManagerBuilder_opaque;
|
||||
extern { pub type Use_opaque; }
|
||||
pub type UseRef = *mut Use_opaque;
|
||||
extern { pub type TargetData_opaque; }
|
||||
pub type TargetDataRef = *mut TargetData_opaque;
|
||||
extern { pub type ObjectFile_opaque; }
|
||||
pub type ObjectFileRef = *mut ObjectFile_opaque;
|
||||
extern { pub type SectionIterator_opaque; }
|
||||
@ -1264,12 +1262,6 @@ extern "C" {
|
||||
/// Writes a module to the specified path. Returns 0 on success.
|
||||
pub fn LLVMWriteBitcodeToFile(M: &Module, Path: *const c_char) -> c_int;
|
||||
|
||||
/// Creates target data from a target layout string.
|
||||
pub fn LLVMCreateTargetData(StringRep: *const c_char) -> TargetDataRef;
|
||||
|
||||
/// Disposes target data.
|
||||
pub fn LLVMDisposeTargetData(TD: TargetDataRef);
|
||||
|
||||
/// Creates a pass manager.
|
||||
pub fn LLVMCreatePassManager() -> PassManagerRef;
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
#![allow(dead_code)]
|
||||
#![deny(bare_trait_objects)]
|
||||
|
||||
pub use self::IntPredicate::*;
|
||||
@ -177,25 +176,6 @@ impl Attribute {
|
||||
}
|
||||
}
|
||||
|
||||
// Memory-managed interface to target data.
|
||||
|
||||
struct TargetData {
|
||||
lltd: TargetDataRef,
|
||||
}
|
||||
|
||||
impl Drop for TargetData {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
LLVMDisposeTargetData(self.lltd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn mk_target_data(string_rep: &str) -> TargetData {
|
||||
let string_rep = CString::new(string_rep).unwrap();
|
||||
TargetData { lltd: unsafe { LLVMCreateTargetData(string_rep.as_ptr()) } }
|
||||
}
|
||||
|
||||
// Memory-managed interface to object files.
|
||||
|
||||
pub struct ObjectFile {
|
||||
@ -254,13 +234,6 @@ pub fn get_param(llfn: ValueRef, index: c_uint) -> ValueRef {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_params(llfn: ValueRef) -> Vec<ValueRef> {
|
||||
unsafe {
|
||||
let num_params = LLVMCountParams(llfn);
|
||||
(0..num_params).map(|idx| LLVMGetParam(llfn, idx)).collect()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn build_string<F>(f: F) -> Option<String>
|
||||
where F: FnOnce(RustStringRef)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user