Merge pull request #403 from espindola/newllvm
Update rust to build with newer llvm versions.
This commit is contained in:
commit
f54f2799c3
5 changed files with 27 additions and 16 deletions
|
|
@ -153,7 +153,6 @@ mod write {
|
|||
True, // unit-at-a-time
|
||||
True, // unroll loops
|
||||
True, // simplify lib calls
|
||||
True, // have exceptions
|
||||
threshold); // inline threshold
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ const uint LLVMNoImplicitFloatAttribute = 8388608u;
|
|||
const uint LLVMNakedAttribute = 16777216u;
|
||||
const uint LLVMInlineHintAttribute = 33554432u;
|
||||
const uint LLVMStackAttribute = 469762048u; // 7 << 26
|
||||
const uint LLVMUWTableAttribute = 1073741824u; // 1 << 30
|
||||
|
||||
|
||||
// Consts for the LLVM IntPredicate type, pre-cast to uint.
|
||||
|
|
@ -813,7 +814,6 @@ native mod llvm = llvm_lib {
|
|||
Bool UnitAtATime,
|
||||
Bool UnrollLoops,
|
||||
Bool SimplifyLibCalls,
|
||||
Bool HaveExceptions,
|
||||
uint InliningThreshold);
|
||||
|
||||
/** Destroys a memory buffer. */
|
||||
|
|
|
|||
|
|
@ -1820,6 +1820,11 @@ fn set_no_inline(ValueRef f) {
|
|||
lib::llvm::llvm::Attribute);
|
||||
}
|
||||
|
||||
fn set_uwtable(ValueRef f) {
|
||||
llvm::LLVMAddFunctionAttr(f, lib::llvm::LLVMUWTableAttribute as
|
||||
lib::llvm::llvm::Attribute);
|
||||
}
|
||||
|
||||
fn set_always_inline(ValueRef f) {
|
||||
llvm::LLVMAddFunctionAttr(f, lib::llvm::LLVMAlwaysInlineAttribute as
|
||||
lib::llvm::llvm::Attribute);
|
||||
|
|
@ -6962,6 +6967,7 @@ fn trans_fn(@local_ctxt cx, &span sp, &ast::_fn f, ast::def_id fid,
|
|||
option::t[ty_self_pair] ty_self,
|
||||
&vec[ast::ty_param] ty_params, &ast::ann ann) {
|
||||
auto llfndecl = cx.ccx.item_ids.get(fid);
|
||||
set_uwtable(llfndecl);
|
||||
|
||||
// Set up arguments to the function.
|
||||
auto fcx = new_fn_ctxt(cx, sp, llfndecl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue