about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-10-24 23:36:10 -0700
committerbors <bors@rust-lang.org>2013-10-24 23:36:10 -0700
commitac82d185b0a9d04bb4e85578aad558da784a2be4 (patch)
treed042d9161edbade83cfbcbab3af238b672df73b3 /src
parentc16a95c587bb5ff5f06894657a1d7aafc69a2084 (diff)
parent327878e628036320e79c9621ac827086986fab9d (diff)
downloadrust-ac82d185b0a9d04bb4e85578aad558da784a2be4.tar.gz
rust-ac82d185b0a9d04bb4e85578aad558da784a2be4.zip
auto merge of #10061 : thestinger/rust/rustc, r=alexcrichton
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/trans/base.rs35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs
index f00fa3e70e1..4e3aa2a9893 100644
--- a/src/librustc/middle/trans/base.rs
+++ b/src/librustc/middle/trans/base.rs
@@ -288,37 +288,6 @@ pub fn get_extern_const(externs: &mut ExternMap, llmod: ModuleRef,
         return c;
     }
 }
-pub fn umax(cx: @mut Block, a: ValueRef, b: ValueRef) -> ValueRef {
-    let _icx = push_ctxt("umax");
-    let cond = ICmp(cx, lib::llvm::IntULT, a, b);
-    return Select(cx, cond, b, a);
-}
-
-pub fn umin(cx: @mut Block, a: ValueRef, b: ValueRef) -> ValueRef {
-    let _icx = push_ctxt("umin");
-    let cond = ICmp(cx, lib::llvm::IntULT, a, b);
-    return Select(cx, cond, a, b);
-}
-
-// Given a pointer p, returns a pointer sz(p) (i.e., inc'd by sz bytes).
-// The type of the returned pointer is always i8*.  If you care about the
-// return type, use bump_ptr().
-pub fn ptr_offs(bcx: @mut Block, base: ValueRef, sz: ValueRef) -> ValueRef {
-    let _icx = push_ctxt("ptr_offs");
-    let raw = PointerCast(bcx, base, Type::i8p());
-    InBoundsGEP(bcx, raw, [sz])
-}
-
-// Increment a pointer by a given amount and then cast it to be a pointer
-// to a given type.
-pub fn bump_ptr(bcx: @mut Block, t: ty::t, base: ValueRef, sz: ValueRef) ->
-   ValueRef {
-    let _icx = push_ctxt("bump_ptr");
-    let ccx = bcx.ccx();
-    let bumped = ptr_offs(bcx, base, sz);
-    let typ = type_of(ccx, t).ptr_to();
-    PointerCast(bcx, bumped, typ)
-}
 
 // Returns a pointer to the body for the box. The box may be an opaque
 // 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 {
     assert!(heap != heap_exchange);
     malloc_general_dyn(bcx, t, heap, llsize_of(bcx.ccx(), ty))
 }
-pub fn malloc_boxed(bcx: @mut Block, t: ty::t)
-    -> MallocResult {
-    malloc_general(bcx, t, heap_managed)
-}
 
 pub fn heap_for_unique(bcx: @mut Block, t: ty::t) -> heap {
     if ty::type_contents(bcx.tcx(), t).contains_managed() {