Skip to content

Commit f93b3cd

Browse files
committed
librustc: Remove debug code; xfail-pretty reverse-complement.
1 parent af4ea11 commit f93b3cd

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/librustc/middle/trans/cabi.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use middle::trans::base::*;
1313
use middle::trans::build::*;
1414
use middle::trans::common::*;
1515

16-
use core::io::println;
1716
use core::libc::c_uint;
1817
use core::option;
1918
use core::vec;

src/librustc/middle/trans/foreign.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,17 +185,19 @@ fn build_wrap_fn_(ccx: @CrateContext,
185185
llshimfn: ValueRef,
186186
llwrapfn: ValueRef,
187187
shim_upcall: ValueRef,
188+
needs_c_return: bool,
188189
arg_builder: wrap_arg_builder,
189190
ret_builder: wrap_ret_builder) {
190191
let _icx = ccx.insn_ctxt("foreign::build_wrap_fn_");
191192
let fcx = new_fn_ctxt(ccx, ~[], llwrapfn, tys.fn_sig.output, None);
192193

193-
// Patch up the return type if it's not immediate.
194-
/*if !ty::type_is_immediate(tys.fn_sig.output) {
194+
// Patch up the return type if it's not immediate and we're returning via
195+
// the C ABI.
196+
if needs_c_return && !ty::type_is_immediate(tys.fn_sig.output) {
195197
let lloutputtype = type_of::type_of(*fcx.ccx, tys.fn_sig.output);
196198
fcx.llretptr = Some(alloca(raw_block(fcx, false, fcx.llstaticallocas),
197199
lloutputtype));
198-
}*/
200+
}
199201

200202
let bcx = top_scope_block(fcx, None);
201203
let lltop = bcx.llbb;
@@ -499,6 +501,7 @@ pub fn trans_foreign_mod(ccx: @CrateContext,
499501
llshimfn,
500502
llwrapfn,
501503
ccx.upcalls.call_shim_on_c_stack,
504+
false,
502505
build_args,
503506
build_ret);
504507

@@ -1229,6 +1232,7 @@ pub fn trans_foreign_fn(ccx: @CrateContext,
12291232
llshimfn,
12301233
llwrapfn,
12311234
ccx.upcalls.call_shim_on_rust_stack,
1235+
true,
12321236
build_args,
12331237
build_ret);
12341238

src/test/bench/shootout-reverse-complement.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// xfail-pretty
2+
13
use core::cast::transmute;
24
use core::libc::{STDOUT_FILENO, c_int, fdopen, fgets, fopen, fputc, fwrite};
35
use core::libc::{size_t};

0 commit comments

Comments
 (0)