Skip to content

Commit 7acebda

Browse files
nikomatsakisbrson
authored andcommitted
---
yaml --- r: 5907 b: refs/heads/master c: 80102c9 h: refs/heads/master i: 5905: bd88d53 5903: 577b024 v: v3
1 parent a3f6f25 commit 7acebda

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 7ab6315f5fe51e9620e48fa4118d44b780e1c828
2+
refs/heads/master: 80102c9d241538a8ec61d2da3db15b63de1ce8d7

trunk/src/comp/middle/trans.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3848,8 +3848,7 @@ fn trans_c_stack_native_call(bcx: @block_ctxt, f: @ast::expr,
38483848

38493849
let r = trans_arg_expr(bcx, ty_arg, llargty, to_zero, to_revoke, arg);
38503850
let llargval = r.val; bcx = r.bcx;
3851-
{ llval: llargval, llty: llargty, static: static,
3852-
by_val: ty_arg.mode == ast::by_val }
3851+
{ llval: llargval, llty: llargty, static: static, mode: ty_arg.mode }
38533852
}, fn_arg_tys, args);
38543853

38553854
// Allocate the argument bundle.
@@ -3865,7 +3864,10 @@ fn trans_c_stack_native_call(bcx: @block_ctxt, f: @ast::expr,
38653864
if llarg.static {
38663865
// FIXME: This load is unfortunate. It won't be necessary once we
38673866
// have reference types again.
3868-
llargval = llarg.by_val ? llarg.llval : Load(bcx, llarg.llval);
3867+
llargval = alt llarg.mode {
3868+
ast::by_val. | ast::by_mut_ref. { llarg.llval }
3869+
ast::by_ref. | ast::mode_infer. { Load(bcx, llarg.llval) }
3870+
};
38693871
} else {
38703872
llargval = llarg.llval;
38713873
}

trunk/src/comp/middle/trans_build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import std::str::sbuf;
33
import lib::llvm::llvm;
44
import llvm::{ValueRef, TypeRef, BasicBlockRef, BuilderRef, Opcode,
55
ModuleRef};
6-
import trans_common::{block_ctxt, T_ptr, T_nil, T_int, T_i8, T_i1, val_ty};
6+
import trans_common::{block_ctxt, T_ptr, T_nil, T_int, T_i8, T_i1,
7+
val_ty, val_str, bcx_ccx};
78

89
fn B(cx: @block_ctxt) -> BuilderRef {
910
let b = *cx.fcx.lcx.ccx.builder;

0 commit comments

Comments
 (0)