Skip to content

Commit bc3f89e

Browse files
committed
rustc: Stop declaring unused upcalls
1 parent 449f4fb commit bc3f89e

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

src/rustc/back/upcall.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,12 @@ use lib::llvm::{type_names, ModuleRef, ValueRef, TypeRef};
99

1010
type upcalls =
1111
{trace: ValueRef,
12-
malloc: ValueRef,
13-
free: ValueRef,
14-
exchange_malloc: ValueRef,
15-
exchange_free: ValueRef,
16-
validate_box: ValueRef,
17-
log_type: ValueRef,
1812
call_shim_on_c_stack: ValueRef,
1913
call_shim_on_rust_stack: ValueRef,
2014
rust_personality: ValueRef,
2115
reset_stack_limit: ValueRef};
2216

2317
fn declare_upcalls(targ_cfg: @session::config,
24-
_tn: type_names,
25-
tydesc_type: TypeRef,
2618
llmod: ModuleRef) -> @upcalls {
2719
fn decl(llmod: ModuleRef, prefix: ~str, name: ~str,
2820
tys: ~[TypeRef], rv: TypeRef) ->
@@ -42,23 +34,6 @@ fn declare_upcalls(targ_cfg: @session::config,
4234
return @{trace: dv(~"trace", ~[T_ptr(T_i8()),
4335
T_ptr(T_i8()),
4436
int_t]),
45-
malloc:
46-
nothrow(d(~"malloc",
47-
~[T_ptr(tydesc_type), int_t],
48-
T_ptr(T_i8()))),
49-
free:
50-
nothrow(dv(~"free", ~[T_ptr(T_i8())])),
51-
exchange_malloc:
52-
nothrow(d(~"exchange_malloc",
53-
~[T_ptr(tydesc_type), int_t],
54-
T_ptr(T_i8()))),
55-
exchange_free:
56-
nothrow(dv(~"exchange_free", ~[T_ptr(T_i8())])),
57-
validate_box:
58-
nothrow(dv(~"validate_box", ~[T_ptr(T_i8())])),
59-
log_type:
60-
dv(~"log_type", ~[T_ptr(tydesc_type),
61-
T_ptr(T_i8()), T_i32()]),
6237
call_shim_on_c_stack:
6338
d(~"call_shim_on_c_stack",
6439
// arguments: void *args, void *fn_ptr

src/rustc/middle/trans/base.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2711,8 +2711,7 @@ fn trans_crate(sess: session::Session,
27112711
llvm_insns: HashMap(),
27122712
fn_times: @mut ~[]},
27132713
upcalls:
2714-
upcall::declare_upcalls(targ_cfg, tn, tydesc_type,
2715-
llmod),
2714+
upcall::declare_upcalls(targ_cfg, llmod),
27162715
rtcalls: HashMap(),
27172716
tydesc_type: tydesc_type,
27182717
int_type: int_type,

0 commit comments

Comments
 (0)