diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-09-30 18:20:28 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-09-30 18:21:39 -0700 |
| commit | e9287e55cc6f95354632be646be18b92af2f9a08 (patch) | |
| tree | adb77e4d0bc5c328da23c06e5a038702bd99d934 /src/comp/middle | |
| parent | f525f6e94ceba86766eb8260abfe2dc1acc43702 (diff) | |
rustc: Stub a --stack-growth option; it's behind a flag for now because it requires patches to LLVM.
Diffstat (limited to 'src/comp/middle')
| -rw-r--r-- | src/comp/middle/trans.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index d40734449c4..ae5d3ca25d1 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1087,7 +1087,8 @@ fn get_static_tydesc(cx: @block_ctxt, orig_t: ty::t, ty_params: [uint], fn set_no_inline(f: ValueRef) { llvm::LLVMAddFunctionAttr(f, lib::llvm::LLVMNoInlineAttribute as - lib::llvm::llvm::Attribute); + lib::llvm::llvm::Attribute, + 0u); } // Tell LLVM to emit the information necessary to unwind the stack for the @@ -1095,13 +1096,20 @@ fn set_no_inline(f: ValueRef) { fn set_uwtable(f: ValueRef) { llvm::LLVMAddFunctionAttr(f, lib::llvm::LLVMUWTableAttribute as - lib::llvm::llvm::Attribute); + lib::llvm::llvm::Attribute, + 0u); } fn set_always_inline(f: ValueRef) { llvm::LLVMAddFunctionAttr(f, lib::llvm::LLVMAlwaysInlineAttribute as - lib::llvm::llvm::Attribute); + lib::llvm::llvm::Attribute, + 0u); +} + +fn set_custom_stack_growth_fn(f: ValueRef) { + // TODO: Remove this hack to work around the lack of u64 in the FFI. + llvm::LLVMAddFunctionAttr(f, 0 as lib::llvm::llvm::Attribute, 1u); } fn set_glue_inlining(cx: @local_ctxt, f: ValueRef, t: ty::t) { |
