Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
763b6cba
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
763b6cba
编写于
2月 25, 2016
作者:
E
Eduard Burtescu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rustc_llvm: Update the Attribute bitflags and remove OtherAttribute.
上级
1d7c9bd1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
40 deletion
+25
-40
src/librustc_llvm/lib.rs
src/librustc_llvm/lib.rs
+25
-40
未找到文件。
src/librustc_llvm/lib.rs
浏览文件 @
763b6cba
...
...
@@ -151,41 +151,40 @@ pub enum DLLStorageClassTypes {
const
OptimizeForSize
=
1
<<
13
,
const
StackProtect
=
1
<<
14
,
const
StackProtectReq
=
1
<<
15
,
const
Alignment
=
1
<<
16
,
const
NoCapture
=
1
<<
21
,
const
NoRedZone
=
1
<<
22
,
const
NoImplicitFloat
=
1
<<
23
,
const
Naked
=
1
<<
24
,
const
InlineHint
=
1
<<
25
,
const
Stack
=
7
<<
26
,
const
ReturnsTwice
=
1
<<
29
,
const
UWTable
=
1
<<
30
,
const
NonLazyBind
=
1
<<
31
,
const
OptimizeNone
=
1
<<
42
,
}
}
#[repr(u64)]
#[derive(Copy,
Clone)]
pub
enum
OtherAttribute
{
// The following are not really exposed in
// the LLVM C api so instead to add these
// we call a wrapper function in RustWrapper
// that uses the C++ api.
SanitizeAddressAttribute
=
1
<<
32
,
MinSizeAttribute
=
1
<<
33
,
NoDuplicateAttribute
=
1
<<
34
,
StackProtectStrongAttribute
=
1
<<
35
,
SanitizeThreadAttribute
=
1
<<
36
,
SanitizeMemoryAttribute
=
1
<<
37
,
NoBuiltinAttribute
=
1
<<
38
,
ReturnedAttribute
=
1
<<
39
,
ColdAttribute
=
1
<<
40
,
BuiltinAttribute
=
1
<<
41
,
OptimizeNoneAttribute
=
1
<<
42
,
InAllocaAttribute
=
1
<<
43
,
NonNullAttribute
=
1
<<
44
,
// Some of these are missing from the LLVM C API, the rest are
// present, but commented out, and preceded by the following warning:
// FIXME: These attributes are currently not included in the C API as
// a temporary measure until the API/ABI impact to the C API is understood
// and the path forward agreed upon.
const
SanitizeAddress
=
1
<<
32
;
const
MinSize
=
1
<<
33
;
const
NoDuplicate
=
1
<<
34
;
const
StackProtectStrong
=
1
<<
35
;
const
SanitizeThread
=
1
<<
36
;
const
SanitizeMemory
=
1
<<
37
;
const
NoBuiltin
=
1
<<
38
;
const
Returned
=
1
<<
39
;
const
Cold
=
1
<<
40
;
const
Builtin
=
1
<<
41
;
const
OptimizeNone
=
1
<<
42
;
const
InAlloca
=
1
<<
43
;
const
NonNull
=
1
<<
44
;
const
JumpTable
=
1
<<
45
;
const
Convergent
=
1
<<
46
;
const
SafeStack
=
1
<<
47
;
const
NoRecurse
=
1
<<
48
;
const
InaccessibleMemOnly
=
1
<<
49
;
const
InaccessibleMemOrArgMemOnly
=
1
<<
50
;
}
}
#[derive(Copy,
Clone)]
...
...
@@ -219,20 +218,6 @@ fn apply_callsite(&self, idx: c_uint, callsite: ValueRef) {
}
}
impl
AttrHelper
for
OtherAttribute
{
fn
apply_llfn
(
&
self
,
idx
:
c_uint
,
llfn
:
ValueRef
)
{
unsafe
{
LLVMAddFunctionAttribute
(
llfn
,
idx
,
*
self
as
uint64_t
);
}
}
fn
apply_callsite
(
&
self
,
idx
:
c_uint
,
callsite
:
ValueRef
)
{
unsafe
{
LLVMAddCallSiteAttribute
(
callsite
,
idx
,
*
self
as
uint64_t
);
}
}
}
impl
AttrHelper
for
SpecialAttribute
{
fn
apply_llfn
(
&
self
,
idx
:
c_uint
,
llfn
:
ValueRef
)
{
match
*
self
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录