Skip to content

Commit ac82d18

Browse files
committed
auto merge of #10061 : thestinger/rust/rustc, r=alexcrichton
2 parents c16a95c + 327878e commit ac82d18

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

src/librustc/middle/trans/base.rs

-35
Original file line numberDiff line numberDiff line change
@@ -288,37 +288,6 @@ pub fn get_extern_const(externs: &mut ExternMap, llmod: ModuleRef,
288288
return c;
289289
}
290290
}
291-
pub fn umax(cx: @mut Block, a: ValueRef, b: ValueRef) -> ValueRef {
292-
let _icx = push_ctxt("umax");
293-
let cond = ICmp(cx, lib::llvm::IntULT, a, b);
294-
return Select(cx, cond, b, a);
295-
}
296-
297-
pub fn umin(cx: @mut Block, a: ValueRef, b: ValueRef) -> ValueRef {
298-
let _icx = push_ctxt("umin");
299-
let cond = ICmp(cx, lib::llvm::IntULT, a, b);
300-
return Select(cx, cond, a, b);
301-
}
302-
303-
// Given a pointer p, returns a pointer sz(p) (i.e., inc'd by sz bytes).
304-
// The type of the returned pointer is always i8*. If you care about the
305-
// return type, use bump_ptr().
306-
pub fn ptr_offs(bcx: @mut Block, base: ValueRef, sz: ValueRef) -> ValueRef {
307-
let _icx = push_ctxt("ptr_offs");
308-
let raw = PointerCast(bcx, base, Type::i8p());
309-
InBoundsGEP(bcx, raw, [sz])
310-
}
311-
312-
// Increment a pointer by a given amount and then cast it to be a pointer
313-
// to a given type.
314-
pub fn bump_ptr(bcx: @mut Block, t: ty::t, base: ValueRef, sz: ValueRef) ->
315-
ValueRef {
316-
let _icx = push_ctxt("bump_ptr");
317-
let ccx = bcx.ccx();
318-
let bumped = ptr_offs(bcx, base, sz);
319-
let typ = type_of(ccx, t).ptr_to();
320-
PointerCast(bcx, bumped, typ)
321-
}
322291

323292
// Returns a pointer to the body for the box. The box may be an opaque
324293
// box. The result will be casted to the type of body_t, if it is statically
@@ -434,10 +403,6 @@ pub fn malloc_general(bcx: @mut Block, t: ty::t, heap: heap) -> MallocResult {
434403
assert!(heap != heap_exchange);
435404
malloc_general_dyn(bcx, t, heap, llsize_of(bcx.ccx(), ty))
436405
}
437-
pub fn malloc_boxed(bcx: @mut Block, t: ty::t)
438-
-> MallocResult {
439-
malloc_general(bcx, t, heap_managed)
440-
}
441406

442407
pub fn heap_for_unique(bcx: @mut Block, t: ty::t) -> heap {
443408
if ty::type_contents(bcx.tcx(), t).contains_managed() {

0 commit comments

Comments
 (0)