use back::write;
use errors::{FatalError, Handler};
use llvm::archive_ro::ArchiveRO;
-use llvm::{TargetMachineRef, True, False};
+use llvm::{True, False};
use llvm;
use rustc::hir::def_id::LOCAL_CRATE;
use rustc::middle::exported_symbols::SymbolExportLevel;
}
fn run_pass_manager(cgcx: &CodegenContext,
- tm: TargetMachineRef,
+ tm: &llvm::TargetMachine,
llmod: &llvm::Module,
config: &ModuleConfig,
thin: bool) {
use rustc::util::nodemap::FxHashMap;
use time_graph::{self, TimeGraph, Timeline};
use llvm;
-use llvm::{TargetMachineRef, PassManagerRef, DiagnosticInfoRef};
+use llvm::{PassManagerRef, DiagnosticInfoRef};
use llvm::SMDiagnosticRef;
use {CodegenResults, ModuleSource, ModuleCodegen, CompiledModule, ModuleKind};
use CrateInfo;
pub fn write_output_file(
handler: &errors::Handler,
- target: llvm::TargetMachineRef,
+ target: &llvm::TargetMachine,
pm: llvm::PassManagerRef,
m: &llvm::Module,
output: &Path,
// pass manager passed to the closure should be ensured to not
// escape the closure itself, and the manager should only be
// used once.
- unsafe fn with_codegen<F, R>(tm: TargetMachineRef,
+ unsafe fn with_codegen<F, R>(tm: &llvm::TargetMachine,
llmod: &llvm::Module,
no_builtins: bool,
f: F) -> R
pub type SectionIteratorRef = *mut SectionIterator;
extern { pub type Pass; }
extern { pub type TargetMachine; }
-pub type TargetMachineRef = *const TargetMachine;
extern { pub type Archive; }
pub type ArchiveRef = *mut Archive;
extern { pub type ArchiveIterator; }
pub fn LLVMRustFindAndCreatePass(Pass: *const c_char) -> Option<&'static mut Pass>;
pub fn LLVMRustAddPass(PM: PassManagerRef, Pass: &'static mut Pass);
- pub fn LLVMRustHasFeature(T: TargetMachineRef, s: *const c_char) -> bool;
+ pub fn LLVMRustHasFeature(T: &TargetMachine, s: *const c_char) -> bool;
- pub fn LLVMRustPrintTargetCPUs(T: TargetMachineRef);
- pub fn LLVMRustPrintTargetFeatures(T: TargetMachineRef);
+ pub fn LLVMRustPrintTargetCPUs(T: &TargetMachine);
+ pub fn LLVMRustPrintTargetFeatures(T: &TargetMachine);
pub fn LLVMRustCreateTargetMachine(Triple: *const c_char,
CPU: *const c_char,
Singlethread: bool)
-> Option<&'static mut TargetMachine>;
pub fn LLVMRustDisposeTargetMachine(T: &'static mut TargetMachine);
- pub fn LLVMRustAddAnalysisPasses(T: TargetMachineRef, PM: PassManagerRef, M: &Module);
+ pub fn LLVMRustAddAnalysisPasses(T: &TargetMachine, PM: PassManagerRef, M: &Module);
pub fn LLVMRustAddBuilderLibraryInfo(PMB: &'a PassManagerBuilder,
M: &'a Module,
DisableSimplifyLibCalls: bool);
M: &Module,
DisableSimplifyLibCalls: bool);
pub fn LLVMRustRunFunctionPassManager(PM: PassManagerRef, M: &Module);
- pub fn LLVMRustWriteOutputFile(T: TargetMachineRef,
+ pub fn LLVMRustWriteOutputFile(T: &'a TargetMachine,
PM: PassManagerRef,
- M: &Module,
+ M: &'a Module,
Output: *const c_char,
FileType: FileType)
-> LLVMRustResult;
-> RustArchiveMemberRef;
pub fn LLVMRustArchiveMemberFree(Member: RustArchiveMemberRef);
- pub fn LLVMRustSetDataLayoutFromTargetMachine(M: &Module, TM: TargetMachineRef);
+ pub fn LLVMRustSetDataLayoutFromTargetMachine(M: &'a Module, TM: &'a TargetMachine);
pub fn LLVMRustBuildOperandBundleDef(Name: *const c_char,
Inputs: *const &Value,