Misc small cleanups
This commit is contained in:
parent
6fe59bf877
commit
38b2e2980e
3 changed files with 1 additions and 9 deletions
|
@ -2406,12 +2406,7 @@ pub fn fill_fn_pair(bcx: @mut Block, pair: ValueRef, llfn: ValueRef,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn item_path(ccx: &CrateContext, id: &ast::NodeId) -> path {
|
pub fn item_path(ccx: &CrateContext, id: &ast::NodeId) -> path {
|
||||||
match ccx.tcx.items.get_copy(id) {
|
ty::item_path(ccx.tcx, ast_util::local_def(*id))
|
||||||
ast_map::node_item(i, p) =>
|
|
||||||
vec::append((*p).clone(), [path_name(i.ident)]),
|
|
||||||
// separate map for paths?
|
|
||||||
_ => fail!("item_path")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn exported_name(ccx: @mut CrateContext, path: path, ty: ty::t, attrs: &[ast::Attribute]) -> ~str {
|
fn exported_name(ccx: @mut CrateContext, path: path, ty: ty::t, attrs: &[ast::Attribute]) -> ~str {
|
||||||
|
|
|
@ -687,7 +687,6 @@ pub fn tuplify_box_ty(tcx: ty::ctxt, t: ty::t) -> ty::t {
|
||||||
t]);
|
t]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// LLVM constant constructors.
|
// LLVM constant constructors.
|
||||||
pub fn C_null(t: Type) -> ValueRef {
|
pub fn C_null(t: Type) -> ValueRef {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -839,8 +839,6 @@ pub fn trans_intrinsic(ccx: @mut CrateContext,
|
||||||
"visit_tydesc" => {
|
"visit_tydesc" => {
|
||||||
let td = get_param(decl, first_real_arg);
|
let td = get_param(decl, first_real_arg);
|
||||||
let visitor = get_param(decl, first_real_arg + 1u);
|
let visitor = get_param(decl, first_real_arg + 1u);
|
||||||
//let llvisitorptr = alloca(bcx, val_ty(visitor));
|
|
||||||
//Store(bcx, visitor, llvisitorptr);
|
|
||||||
let td = PointerCast(bcx, td, ccx.tydesc_type.ptr_to());
|
let td = PointerCast(bcx, td, ccx.tydesc_type.ptr_to());
|
||||||
glue::call_tydesc_glue_full(bcx, visitor, td,
|
glue::call_tydesc_glue_full(bcx, visitor, td,
|
||||||
abi::tydesc_field_visit_glue, None);
|
abi::tydesc_field_visit_glue, None);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue