Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
21b98223
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,发现更多精彩内容 >>
提交
21b98223
编写于
1月 06, 2018
作者:
G
Guillaume Gomez
提交者:
GitHub
1月 06, 2018
浏览文件
操作
浏览文件
下载
差异文件
Rollup merge of #47173 - dotdash:cleanup, r=michaelwoerister
Remove some outdated LLVM-related code Ticks two boxes on #46437
上级
5624ac7c
7e522b2f
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
13 addition
and
34 deletion
+13
-34
src/librustc_llvm/ffi.rs
src/librustc_llvm/ffi.rs
+6
-10
src/librustc_trans/builder.rs
src/librustc_trans/builder.rs
+3
-4
src/librustc_trans/intrinsic.rs
src/librustc_trans/intrinsic.rs
+1
-1
src/librustc_trans/mir/block.rs
src/librustc_trans/mir/block.rs
+1
-1
src/rustllvm/RustWrapper.cpp
src/rustllvm/RustWrapper.cpp
+2
-18
未找到文件。
src/librustc_llvm/ffi.rs
浏览文件 @
21b98223
...
...
@@ -538,9 +538,6 @@ pub enum ModuleBuffer {}
/// See llvm::LLVMTypeKind::getTypeID.
pub
fn
LLVMRustGetTypeKind
(
Ty
:
TypeRef
)
->
TypeKind
;
/// See llvm::Value::getContext
pub
fn
LLVMRustGetValueContext
(
V
:
ValueRef
)
->
ContextRef
;
// Operations on integer types
pub
fn
LLVMInt1TypeInContext
(
C
:
ContextRef
)
->
TypeRef
;
pub
fn
LLVMInt8TypeInContext
(
C
:
ContextRef
)
->
TypeRef
;
...
...
@@ -812,12 +809,11 @@ pub fn LLVMRustBuildInvoke(B: BuilderRef,
Bundle
:
OperandBundleDefRef
,
Name
:
*
const
c_char
)
->
ValueRef
;
pub
fn
LLVM
Rust
BuildLandingPad
(
B
:
BuilderRef
,
pub
fn
LLVMBuildLandingPad
(
B
:
BuilderRef
,
Ty
:
TypeRef
,
PersFn
:
ValueRef
,
NumClauses
:
c_uint
,
Name
:
*
const
c_char
,
F
:
ValueRef
)
Name
:
*
const
c_char
)
->
ValueRef
;
pub
fn
LLVMBuildResume
(
B
:
BuilderRef
,
Exn
:
ValueRef
)
->
ValueRef
;
pub
fn
LLVMBuildUnreachable
(
B
:
BuilderRef
)
->
ValueRef
;
...
...
src/librustc_trans/builder.rs
浏览文件 @
21b98223
...
...
@@ -1012,12 +1012,11 @@ pub fn trap(&self) {
}
pub
fn
landing_pad
(
&
self
,
ty
:
Type
,
pers_fn
:
ValueRef
,
num_clauses
:
usize
,
llfn
:
ValueRef
)
->
ValueRef
{
num_clauses
:
usize
)
->
ValueRef
{
self
.count_insn
(
"landingpad"
);
unsafe
{
llvm
::
LLVM
Rust
BuildLandingPad
(
self
.llbuilder
,
ty
.to_ref
(),
pers_fn
,
num_clauses
as
c_uint
,
noname
(),
llfn
)
llvm
::
LLVMBuildLandingPad
(
self
.llbuilder
,
ty
.to_ref
(),
pers_fn
,
num_clauses
as
c_uint
,
noname
()
)
}
}
...
...
src/librustc_trans/intrinsic.rs
浏览文件 @
21b98223
...
...
@@ -925,7 +925,7 @@ fn trans_gnu_try<'a, 'tcx>(bcx: &Builder<'a, 'tcx>,
// rust_try ignores the selector.
let
lpad_ty
=
Type
::
struct_
(
ccx
,
&
[
Type
::
i8p
(
ccx
),
Type
::
i32
(
ccx
)],
false
);
let
vals
=
catch
.landing_pad
(
lpad_ty
,
bcx
.ccx
.eh_personality
(),
1
,
catch
.llfn
()
);
let
vals
=
catch
.landing_pad
(
lpad_ty
,
bcx
.ccx
.eh_personality
(),
1
);
catch
.add_clause
(
vals
,
C_null
(
Type
::
i8p
(
ccx
)));
let
ptr
=
catch
.extract_value
(
vals
,
0
);
let
ptr_align
=
bcx
.tcx
()
.data_layout.pointer_align
;
...
...
src/librustc_trans/mir/block.rs
浏览文件 @
21b98223
...
...
@@ -753,7 +753,7 @@ fn landing_pad_uncached(&mut self, target_bb: BasicBlockRef) -> BasicBlockRef {
let
llpersonality
=
self
.ccx
.eh_personality
();
let
llretty
=
self
.landing_pad_type
();
let
lp
=
bcx
.landing_pad
(
llretty
,
llpersonality
,
1
,
self
.llfn
);
let
lp
=
bcx
.landing_pad
(
llretty
,
llpersonality
,
1
);
bcx
.set_cleanup
(
lp
);
let
slot
=
self
.get_personality_slot
(
&
bcx
);
...
...
src/rustllvm/RustWrapper.cpp
浏览文件 @
21b98223
...
...
@@ -1144,13 +1144,6 @@ extern "C" void LLVMRustWriteSMDiagnosticToString(LLVMSMDiagnosticRef D,
unwrap
(
D
)
->
print
(
""
,
OS
);
}
extern
"C"
LLVMValueRef
LLVMRustBuildLandingPad
(
LLVMBuilderRef
B
,
LLVMTypeRef
Ty
,
LLVMValueRef
PersFn
,
unsigned
NumClauses
,
const
char
*
Name
,
LLVMValueRef
F
)
{
return
LLVMBuildLandingPad
(
B
,
Ty
,
PersFn
,
NumClauses
,
Name
);
}
extern
"C"
LLVMValueRef
LLVMRustBuildCleanupPad
(
LLVMBuilderRef
B
,
LLVMValueRef
ParentPad
,
unsigned
ArgCount
,
...
...
@@ -1355,10 +1348,6 @@ extern "C" bool LLVMRustConstInt128Get(LLVMValueRef CV, bool sext, uint64_t *hig
return
true
;
}
extern
"C"
LLVMContextRef
LLVMRustGetValueContext
(
LLVMValueRef
V
)
{
return
wrap
(
&
unwrap
(
V
)
->
getContext
());
}
enum
class
LLVMRustVisibility
{
Default
=
0
,
Hidden
=
1
,
...
...
@@ -1439,11 +1428,6 @@ LLVMRustModuleBufferLen(const LLVMRustModuleBuffer *Buffer) {
extern
"C"
uint64_t
LLVMRustModuleCost
(
LLVMModuleRef
M
)
{
Module
&
Mod
=
*
unwrap
(
M
);
uint64_t
cost
=
0
;
for
(
auto
&
F
:
Mod
.
functions
())
{
(
void
)
F
;
cost
+=
1
;
}
return
cost
;
auto
f
=
unwrap
(
M
)
->
functions
();
return
std
::
distance
(
std
::
begin
(
f
),
std
::
end
(
f
));
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录