Skip to content

Commit e53f48b

Browse files
committed
middle: trans: common: remove dead code
1 parent 8f385fc commit e53f48b

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

src/librustc/middle/trans/common.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use middle::trans::datum;
2424
use middle::trans::datum::{Datum, Lvalue};
2525
use middle::trans::debuginfo;
2626
use middle::trans::type_::Type;
27-
use middle::ty::substs;
2827
use middle::ty;
2928
use middle::typeck;
3029
use util::ppaux::Repr;
@@ -456,14 +455,6 @@ impl<'a> Block<'a> {
456455
e.repr(self.tcx())
457456
}
458457

459-
pub fn expr_is_lval(&self, e: &ast::Expr) -> bool {
460-
ty::expr_is_lval(self.tcx(), self.ccx().maps.method_map, e)
461-
}
462-
463-
pub fn expr_kind(&self, e: &ast::Expr) -> ty::ExprKind {
464-
ty::expr_kind(self.tcx(), self.ccx().maps.method_map, e)
465-
}
466-
467458
pub fn def(&self, nid: ast::NodeId) -> ast::Def {
468459
match self.tcx().def_map.borrow().find(&nid) {
469460
Some(&v) => v,
@@ -504,13 +495,6 @@ pub fn rslt<'a>(bcx: &'a Block<'a>, val: ValueRef) -> Result<'a> {
504495
}
505496
}
506497

507-
impl<'a> Result<'a> {
508-
pub fn unpack(&self, bcx: &mut &'a Block<'a>) -> ValueRef {
509-
*bcx = self.bcx;
510-
return self.val;
511-
}
512-
}
513-
514498
pub fn val_ty(v: ValueRef) -> Type {
515499
unsafe {
516500
Type::from_ref(llvm::LLVMTypeOf(v))
@@ -749,22 +733,6 @@ pub struct mono_id_ {
749733

750734
pub type mono_id = @mono_id_;
751735

752-
pub fn umax(cx: &Block, a: ValueRef, b: ValueRef) -> ValueRef {
753-
let cond = build::ICmp(cx, lib::llvm::IntULT, a, b);
754-
return build::Select(cx, cond, b, a);
755-
}
756-
757-
pub fn umin(cx: &Block, a: ValueRef, b: ValueRef) -> ValueRef {
758-
let cond = build::ICmp(cx, lib::llvm::IntULT, a, b);
759-
return build::Select(cx, cond, a, b);
760-
}
761-
762-
pub fn align_to(cx: &Block, off: ValueRef, align: ValueRef) -> ValueRef {
763-
let mask = build::Sub(cx, align, C_int(cx.ccx(), 1));
764-
let bumped = build::Add(cx, off, mask);
765-
return build::And(cx, bumped, build::Not(cx, mask));
766-
}
767-
768736
pub fn monomorphize_type(bcx: &Block, t: ty::t) -> ty::t {
769737
match bcx.fcx.param_substs {
770738
Some(substs) => {
@@ -928,14 +896,6 @@ pub fn find_vtable(tcx: &ty::ctxt,
928896
param_bounds.get(n_bound).clone()
929897
}
930898

931-
pub fn dummy_substs(tps: Vec<ty::t> ) -> ty::substs {
932-
substs {
933-
regions: ty::ErasedRegions,
934-
self_ty: None,
935-
tps: tps
936-
}
937-
}
938-
939899
pub fn filename_and_line_num_from_span(bcx: &Block, span: Span)
940900
-> (ValueRef, ValueRef) {
941901
let loc = bcx.sess().codemap().lookup_char_pos(span.lo);

0 commit comments

Comments
 (0)