use back::bytecode::RLIB_BYTECODE_EXTENSION;
-pub use llvm_util::{target_features, print_version, print_passes};
+pub use llvm_util::target_features;
use std::any::Any;
use std::path::PathBuf;
impl !Sync for LlvmTransCrate {}
impl LlvmTransCrate {
- pub fn new(sess: &Session) -> Box<TransCrate> {
- llvm_util::init(sess); // Make sure llvm is inited
+ pub fn new() -> Box<TransCrate> {
box LlvmTransCrate(())
}
}
impl TransCrate for LlvmTransCrate {
+ fn init(&self, sess: &Session) {
+ llvm_util::init(sess); // Make sure llvm is inited
+ }
+
fn print(&self, req: PrintRequest, sess: &Session) {
match req {
PrintRequest::RelocationModels => {
}
}
+ fn print_passes(&self) {
+ llvm_util::print_passes();
+ }
+
+ fn print_version(&self) {
+ llvm_util::print_version();
+ }
+
+ #[cfg(not(stage0))]
+ fn diagnostics(&self) -> &[(&'static str, &'static str)] {
+ &DIAGNOSTICS
+ }
+
fn target_features(&self, sess: &Session) -> Vec<Symbol> {
target_features(sess)
}
/// This is the entrypoint for a hot plugged rustc_trans
#[no_mangle]
-pub fn __rustc_codegen_backend(sess: &Session) -> Box<TransCrate> {
- LlvmTransCrate::new(sess)
+pub fn __rustc_codegen_backend() -> Box<TransCrate> {
+ LlvmTransCrate::new()
}
struct ModuleTranslation {