diff options
| author | Graydon Hoare <[email protected]> | 2011-02-02 16:22:11 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-02-02 16:22:11 -0800 |
| commit | c863427b64f51fd55cc6191ed08cbfb88034d05b (patch) | |
| tree | 23e0a41197a27bf034aaf7678e88cf248d64bab0 /src/comp | |
| parent | Store tydesc for whole body, not just fields, in objs and closures. Handles u... (diff) | |
| download | rust-c863427b64f51fd55cc6191ed08cbfb88034d05b.tar.xz rust-c863427b64f51fd55cc6191ed08cbfb88034d05b.zip | |
Hack to work around apparent LLVM bug?
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/trans.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 36f54ea8..3db5be5f 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -3229,7 +3229,13 @@ fn new_block_ctxt(@fn_ctxt cx, block_parent parent, // Use this when you're at the top block of a function or the like. fn new_top_block_ctxt(@fn_ctxt fcx) -> @block_ctxt { - ret new_block_ctxt(fcx, parent_none, SCOPE_BLOCK, "function top level"); + auto cx = new_block_ctxt(fcx, parent_none, SCOPE_BLOCK, + "function top level"); + + // FIXME: hack to give us some spill room to make up for an LLVM + // bug where it destroys its own callee-saves. + cx.build.Alloca(T_array(T_int(), 10u)); + ret cx; } // Use this when you're at a curly-brace or similar lexical scope. |