diff options
author | Robin Kruppe <robin.kruppe@gmail.com> | 2016-11-16 23:36:08 +0100 |
---|---|---|
committer | Robin Kruppe <robin.kruppe@gmail.com> | 2016-11-17 21:12:26 +0100 |
commit | 30daedf60355d105d92ad011b9e115b01350593e (patch) | |
tree | e7c0fa4e45b5620d621aa137844c2dc9b73fb521 /src/librustc_trans/cabi_asmjs.rs | |
parent | 5887ee5018c064805a97af9e8331c3bf9571d9e5 (diff) | |
download | rust-30daedf60355d105d92ad011b9e115b01350593e.tar.gz |
Use llvm::Attribute API instead of "raw value" APIs, which will be removed in LLVM 4.0.
The librustc_llvm API remains mostly unchanged, except that llvm::Attribute is no longer a bitflag but represents only a *single* attribute.
The ability to store many attributes in a small number of bits and modify them without interacting with LLVM is only used in rustc_trans::abi and closely related modules, and only attributes for function arguments are considered there.
Thus rustc_trans::abi now has its own bit-packed representation of argument attributes, which are translated to rustc_llvm::Attribute when applying the attributes.
Diffstat (limited to 'src/librustc_trans/cabi_asmjs.rs')
-rw-r--r-- | src/librustc_trans/cabi_asmjs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_trans/cabi_asmjs.rs b/src/librustc_trans/cabi_asmjs.rs index 3cbc378ab02..f410627400c 100644 --- a/src/librustc_trans/cabi_asmjs.rs +++ b/src/librustc_trans/cabi_asmjs.rs @@ -10,8 +10,8 @@ #![allow(non_upper_case_globals)] -use llvm::{Struct, Array, Attribute}; -use abi::{FnType, ArgType}; +use llvm::{Struct, Array}; +use abi::{FnType, ArgType, ArgAttribute}; use context::CrateContext; // Data layout: e-p:32:32-i64:64-v128:32:128-n32-S128 @@ -39,7 +39,7 @@ fn classify_ret_ty(ccx: &CrateContext, ret: &mut ArgType) { fn classify_arg_ty(ccx: &CrateContext, arg: &mut ArgType) { if arg.ty.is_aggregate() { arg.make_indirect(ccx); - arg.attrs.set(Attribute::ByVal); + arg.attrs.set(ArgAttribute::ByVal); } } |