New Backend trait containing associated types
This commit is contained in:
parent
d577ec7e5f
commit
3889c2dcfb
4 changed files with 26 additions and 9 deletions
|
@ -18,7 +18,7 @@ use rustc::ty::TyCtxt;
|
|||
use rustc::ty::layout::{Align, Size};
|
||||
use rustc::session::{config, Session};
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use interfaces::BuilderMethods;
|
||||
use interfaces::{BuilderMethods, Backend};
|
||||
use syntax;
|
||||
|
||||
use std::borrow::Cow;
|
||||
|
@ -55,11 +55,13 @@ bitflags! {
|
|||
}
|
||||
}
|
||||
|
||||
impl BuilderMethods<'a, 'll, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
type Value = &'ll Value;
|
||||
type BasicBlock = &'ll BasicBlock;
|
||||
type Type = &'ll type_::Type;
|
||||
impl Backend for Builder<'a, 'll, 'tcx> {
|
||||
type Value = &'ll Value;
|
||||
type BasicBlock = &'ll BasicBlock;
|
||||
type Type = &'ll type_::Type;
|
||||
}
|
||||
|
||||
impl BuilderMethods<'a, 'll, 'tcx> for Builder<'a, 'll, 'tcx> {
|
||||
fn new_block<'b>(
|
||||
cx: &'a CodegenCx<'ll, 'tcx>,
|
||||
llfn: &'ll Value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue