aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-02-02 16:22:11 -0800
committerGraydon Hoare <[email protected]>2011-02-02 16:22:11 -0800
commitc863427b64f51fd55cc6191ed08cbfb88034d05b (patch)
tree23e0a41197a27bf034aaf7678e88cf248d64bab0
parentStore tydesc for whole body, not just fields, in objs and closures. Handles u... (diff)
downloadrust-c863427b64f51fd55cc6191ed08cbfb88034d05b.tar.xz
rust-c863427b64f51fd55cc6191ed08cbfb88034d05b.zip
Hack to work around apparent LLVM bug?
-rw-r--r--src/comp/middle/trans.rs8
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.