Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
1be7f966
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
1be7f966
编写于
2月 19, 2018
作者:
M
Michael Woerister
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename is_translated_fn query to is_translated_item and make it support statics.
上级
8ff633cc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
7 addition
and
6 deletion
+7
-6
src/librustc/dep_graph/dep_node.rs
src/librustc/dep_graph/dep_node.rs
+1
-1
src/librustc/ty/maps/mod.rs
src/librustc/ty/maps/mod.rs
+1
-1
src/librustc/ty/maps/plumbing.rs
src/librustc/ty/maps/plumbing.rs
+1
-1
src/librustc_trans/base.rs
src/librustc_trans/base.rs
+3
-2
src/librustc_trans/callee.rs
src/librustc_trans/callee.rs
+1
-1
未找到文件。
src/librustc/dep_graph/dep_node.rs
浏览文件 @
1be7f966
...
...
@@ -625,7 +625,7 @@ pub fn fingerprint_needed_for_crate_hash(self) -> bool {
[
eval_always
]
CollectAndPartitionTranslationItems
,
[]
ExportName
(
DefId
),
[]
ContainsExternIndicator
(
DefId
),
[]
IsTranslated
Function
(
DefId
),
[]
IsTranslated
Item
(
DefId
),
[]
CodegenUnit
(
InternedString
),
[]
CompileCodegenUnit
(
InternedString
),
[
input
]
OutputFilenames
,
...
...
src/librustc/ty/maps/mod.rs
浏览文件 @
1be7f966
...
...
@@ -349,7 +349,7 @@
[]
fn
export_name
:
ExportName
(
DefId
)
->
Option
<
Symbol
>
,
[]
fn
contains_extern_indicator
:
ContainsExternIndicator
(
DefId
)
->
bool
,
[]
fn
symbol_export_level
:
GetSymbolExportLevel
(
DefId
)
->
SymbolExportLevel
,
[]
fn
is_translated_
function
:
IsTranslatedFunction
(
DefId
)
->
bool
,
[]
fn
is_translated_
item
:
IsTranslatedItem
(
DefId
)
->
bool
,
[]
fn
codegen_unit
:
CodegenUnit
(
InternedString
)
->
Arc
<
CodegenUnit
<
'tcx
>>
,
[]
fn
compile_codegen_unit
:
CompileCodegenUnit
(
InternedString
)
->
Stats
,
[]
fn
output_filenames
:
output_filenames_node
(
CrateNum
)
...
...
src/librustc/ty/maps/plumbing.rs
浏览文件 @
1be7f966
...
...
@@ -929,7 +929,7 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>,
DepKind
::
ContainsExternIndicator
=>
{
force!
(
contains_extern_indicator
,
def_id!
());
}
DepKind
::
IsTranslated
Function
=>
{
force!
(
is_translated_function
,
def_id!
());
}
DepKind
::
IsTranslated
Item
=>
{
force!
(
is_translated_item
,
def_id!
());
}
DepKind
::
OutputFilenames
=>
{
force!
(
output_filenames
,
LOCAL_CRATE
);
}
DepKind
::
TargetFeaturesWhitelist
=>
{
force!
(
target_features_whitelist
,
LOCAL_CRATE
);
}
...
...
src/librustc_trans/base.rs
浏览文件 @
1be7f966
...
...
@@ -1004,6 +1004,7 @@ fn collect_and_partition_translation_items<'a, 'tcx>(
let
translation_items
:
DefIdSet
=
items
.iter
()
.filter_map
(|
trans_item
|
{
match
*
trans_item
{
MonoItem
::
Fn
(
ref
instance
)
=>
Some
(
instance
.def_id
()),
MonoItem
::
Static
(
def_id
)
=>
Some
(
def_id
),
_
=>
None
,
}
})
.collect
();
...
...
@@ -1107,7 +1108,7 @@ pub fn new(tcx: TyCtxt) -> CrateInfo {
}
}
fn
is_translated_
function
(
tcx
:
TyCtxt
,
id
:
DefId
)
->
bool
{
fn
is_translated_
item
(
tcx
:
TyCtxt
,
id
:
DefId
)
->
bool
{
let
(
all_trans_items
,
_
)
=
tcx
.collect_and_partition_translation_items
(
LOCAL_CRATE
);
all_trans_items
.contains
(
&
id
)
...
...
@@ -1222,7 +1223,7 @@ pub fn provide(providers: &mut Providers) {
providers
.collect_and_partition_translation_items
=
collect_and_partition_translation_items
;
providers
.is_translated_
function
=
is_translated_function
;
providers
.is_translated_
item
=
is_translated_item
;
providers
.codegen_unit
=
|
tcx
,
name
|
{
let
(
_
,
all
)
=
tcx
.collect_and_partition_translation_items
(
LOCAL_CRATE
);
...
...
src/librustc_trans/callee.rs
浏览文件 @
1be7f966
...
...
@@ -149,7 +149,7 @@ pub fn get_fn<'a, 'tcx>(cx: &CodegenCx<'a, 'tcx>,
unsafe
{
llvm
::
LLVMRustSetLinkage
(
llfn
,
llvm
::
Linkage
::
ExternalLinkage
);
if
cx
.tcx
.is_translated_
function
(
instance_def_id
)
{
if
cx
.tcx
.is_translated_
item
(
instance_def_id
)
{
if
instance_def_id
.is_local
()
{
if
!
cx
.tcx
.is_exported_symbol
(
instance_def_id
)
{
llvm
::
LLVMRustSetVisibility
(
llfn
,
llvm
::
Visibility
::
Hidden
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录