Skip to content

Commit edf0ff2

Browse files
committed
---
yaml --- r: 1022 b: refs/heads/master c: e558ff9 h: refs/heads/master v: v3
1 parent 52e3a20 commit edf0ff2

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
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: 7f85945b054ff5b991ae1be021882ba15f56d416
2+
refs/heads/master: e558ff907f1df4a2b67a58d37cbc11c0172d1eb6

trunk/src/comp/middle/trans.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,12 +1885,15 @@ fn copy_args_to_allocas(@block_ctxt cx, vec[ast.arg] args,
18851885
let uint arg_n = 0u;
18861886

18871887
for (ast.arg aarg in args) {
1888-
auto arg_t = type_of_arg(cx.fcx.ccx, arg_tys.(arg_n));
1889-
auto alloca = cx.build.Alloca(arg_t);
1890-
auto argval = cx.fcx.llargs.get(aarg.id);
1891-
cx.build.Store(argval, alloca);
1892-
// Overwrite the llargs entry for this arg with its alloca.
1893-
cx.fcx.llargs.insert(aarg.id, alloca);
1888+
if (aarg.mode != ast.alias) {
1889+
auto arg_t = type_of_arg(cx.fcx.ccx, arg_tys.(arg_n));
1890+
auto alloca = cx.build.Alloca(arg_t);
1891+
auto argval = cx.fcx.llargs.get(aarg.id);
1892+
cx.build.Store(argval, alloca);
1893+
// Overwrite the llargs entry for this arg with its alloca.
1894+
cx.fcx.llargs.insert(aarg.id, alloca);
1895+
}
1896+
18941897
arg_n += 1u;
18951898
}
18961899
}

0 commit comments

Comments
 (0)