Skip to content

Commit 8780db2

Browse files
committed
rustc: Delete some unused invoke code
1 parent b420f46 commit 8780db2

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

src/rustc/middle/trans/base.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2730,7 +2730,7 @@ fn trans_call_inner(in_cx: block, fn_expr_ty: ty::t, ret_ty: ty::t,
27302730
then one or more of the args has
27312731
type _|_. Since that means it diverges, the code
27322732
for the call itself is unreachable. */
2733-
bcx = invoke_full(bcx, faddr, llargs);
2733+
bcx = invoke(bcx, faddr, llargs);
27342734
alt dest {
27352735
ignore {
27362736
if llvm::LLVMIsUndef(llretslot) != lib::llvm::True {
@@ -2759,31 +2759,13 @@ fn trans_call_inner(in_cx: block, fn_expr_ty: ty::t, ret_ty: ty::t,
27592759
}
27602760
}
27612761

2762-
fn invoke(bcx: block, llfn: ValueRef,
2763-
llargs: [ValueRef]) -> block {
2764-
ret invoke_(bcx, llfn, llargs, Invoke);
2765-
}
2766-
2767-
fn invoke_full(bcx: block, llfn: ValueRef, llargs: [ValueRef])
2768-
-> block {
2769-
ret invoke_(bcx, llfn, llargs, Invoke);
2770-
}
2771-
2772-
fn invoke_(bcx: block, llfn: ValueRef, llargs: [ValueRef],
2773-
invoker: fn(block, ValueRef, [ValueRef],
2774-
BasicBlockRef, BasicBlockRef)) -> block {
2762+
fn invoke(bcx: block, llfn: ValueRef, llargs: [ValueRef]) -> block {
27752763
let _icx = bcx.insn_ctxt("invoke_");
27762764
// FIXME: May be worth turning this into a plain call when there are no
27772765
// cleanups to run
27782766
if bcx.unreachable { ret bcx; }
27792767
let normal_bcx = sub_block(bcx, "normal return");
2780-
/*io::println("fn: " + lib::llvm::type_to_str(bcx.ccx().tn,
2781-
val_ty(llfn)));
2782-
for a in llargs {
2783-
io::println(" a: " + lib::llvm::type_to_str(bcx.ccx().tn,
2784-
val_ty(a)));
2785-
}*/
2786-
invoker(bcx, llfn, llargs, normal_bcx.llbb, get_landing_pad(bcx));
2768+
Invoke(bcx, llfn, llargs, normal_bcx.llbb, get_landing_pad(bcx));
27872769
ret normal_bcx;
27882770
}
27892771

0 commit comments

Comments
 (0)