Skip to content

Commit cdc5dc6

Browse files
committed
---
yaml --- r: 56279 b: refs/heads/auto c: f93b3cd h: refs/heads/master i: 56277: 6e5f1f9 56275: 5bc8e4d 56271: 7c2a389 v: v3
1 parent d9e3685 commit cdc5dc6

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: af4ea11d09618b800ebec477333a373a75a46d96
17+
refs/heads/auto: f93b3cd5c3783eabd527607adda891d8a84dab4f
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/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;

branches/auto/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

branches/auto/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)