Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
c6f16ed2
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
c6f16ed2
编写于
12月 14, 2011
作者:
J
Josh Matthews
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Hide extended, unfinished debug information behind --xg compiler flag.
上级
8597077b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
10 deletion
+18
-10
src/comp/driver/rustc.rs
src/comp/driver/rustc.rs
+4
-2
src/comp/driver/session.rs
src/comp/driver/session.rs
+1
-0
src/comp/middle/debuginfo.rs
src/comp/middle/debuginfo.rs
+8
-3
src/comp/middle/trans.rs
src/comp/middle/trans.rs
+5
-5
未找到文件。
src/comp/driver/rustc.rs
浏览文件 @
c6f16ed2
...
...
@@ -421,7 +421,8 @@ fn build_session_options(match: getopts::match)
let
libcore
=
!
opt_present
(
match
,
"no-core"
);
let
verify
=
!
opt_present
(
match
,
"no-verify"
);
let
save_temps
=
opt_present
(
match
,
"save-temps"
);
let
debuginfo
=
opt_present
(
match
,
"g"
);
let
extra_debuginfo
=
opt_present
(
match
,
"xg"
);
let
debuginfo
=
opt_present
(
match
,
"g"
)
||
extra_debuginfo
;
let
stats
=
opt_present
(
match
,
"stats"
);
let
time_passes
=
opt_present
(
match
,
"time-passes"
);
let
time_llvm_passes
=
opt_present
(
match
,
"time-llvm-passes"
);
...
...
@@ -468,6 +469,7 @@ fn build_session_options(match: getopts::match)
libcore
:
libcore
,
optimize
:
opt_level
,
debuginfo
:
debuginfo
,
extra_debuginfo
:
extra_debuginfo
,
verify
:
verify
,
save_temps
:
save_temps
,
stats
:
stats
,
...
...
@@ -516,7 +518,7 @@ fn opts() -> [getopts::opt] {
optflag
(
"emit-llvm"
),
optflagopt
(
"pretty"
),
optflag
(
"ls"
),
optflag
(
"parse-only"
),
optflag
(
"no-trans"
),
optflag
(
"O"
),
optopt
(
"opt-level"
),
optmulti
(
"L"
),
optflag
(
"S"
),
optopt
(
"o"
),
optopt
(
"out-dir"
),
optopt
(
"o"
),
optopt
(
"out-dir"
),
optflag
(
"xg"
),
optflag
(
"c"
),
optflag
(
"g"
),
optflag
(
"save-temps"
),
optopt
(
"sysroot"
),
optopt
(
"target"
),
optflag
(
"stats"
),
optflag
(
"time-passes"
),
optflag
(
"time-llvm-passes"
),
...
...
src/comp/driver/session.rs
浏览文件 @
c6f16ed2
...
...
@@ -31,6 +31,7 @@
libcore
:
bool
,
optimize
:
uint
,
debuginfo
:
bool
,
extra_debuginfo
:
bool
,
verify
:
bool
,
save_temps
:
bool
,
stats
:
bool
,
...
...
src/comp/middle/debuginfo.rs
浏览文件 @
c6f16ed2
...
...
@@ -782,9 +782,14 @@ fn create_function(fcx: @fn_ctxt, item: @ast::item, llfndecl: ValueRef)
let
ret_ty
=
alt
item
.node
{
ast
::
item_fn
(
f
,
_
)
{
f
.decl.output
}
};
let
ty_node
=
alt
ret_ty
.node
{
ast
::
ty_nil
.
{
llnull
()
}
_
{
create_ty
(
cx
,
ty
::
node_id_to_type
(
ccx_tcx
(
cx
),
item
.id
),
ret_ty
)
.node
}
let
ty_node
=
if
cx
.sess
.get_opts
()
.extra_debuginfo
{
alt
ret_ty
.node
{
ast
::
ty_nil
.
{
llnull
()
}
_
{
create_ty
(
cx
,
ty
::
node_id_to_type
(
ccx_tcx
(
cx
),
item
.id
),
ret_ty
)
.node
}
}
}
else
{
llnull
()
};
let
sub_node
=
create_composite_type
(
SubroutineTag
,
""
,
file_node
,
0
,
0
,
0
,
0
,
option
::
none
,
...
...
src/comp/middle/trans.rs
浏览文件 @
c6f16ed2
...
...
@@ -4027,7 +4027,7 @@ fn trans_stmt(cx: @block_ctxt, s: ast::stmt) -> @block_ctxt {
}
else
{
bcx
=
init_ref_local
(
bcx
,
local
);
}
if
bcx_ccx
(
cx
)
.sess
.get_opts
()
.debuginfo
{
if
bcx_ccx
(
cx
)
.sess
.get_opts
()
.
extra_
debuginfo
{
debuginfo
::
create_local_var
(
bcx
,
local
);
}
}
...
...
@@ -4422,7 +4422,7 @@ fn create_llargs_for_fn_args(cx: @fn_ctxt, ty_self: self_arg,
fn
copy_args_to_allocas
(
fcx
:
@
fn_ctxt
,
bcx
:
@
block_ctxt
,
args
:
[
ast
::
arg
],
arg_tys
:
[
ty
::
arg
])
->
@
block_ctxt
{
if
fcx_ccx
(
fcx
)
.sess
.get_opts
()
.debuginfo
{
if
fcx_ccx
(
fcx
)
.sess
.get_opts
()
.
extra_
debuginfo
{
llvm
::
LLVMAddAttribute
(
llvm
::
LLVMGetFirstParam
(
fcx
.llfn
),
lib
::
llvm
::
LLVMStructRetAttribute
as
lib
::
llvm
::
llvm
::
Attribute
);
...
...
@@ -4446,7 +4446,7 @@ fn copy_args_to_allocas(fcx: @fn_ctxt, bcx: @block_ctxt, args: [ast::arg],
}
ast
::
by_ref
.
{}
}
if
fcx_ccx
(
fcx
)
.sess
.get_opts
()
.debuginfo
{
if
fcx_ccx
(
fcx
)
.sess
.get_opts
()
.
extra_
debuginfo
{
debuginfo
::
create_arg
(
bcx
,
args
[
arg_n
]);
}
arg_n
+=
1u
;
...
...
@@ -4584,7 +4584,7 @@ fn trans_fn(cx: @local_ctxt, sp: span, f: ast::_fn, llfndecl: ValueRef,
let
start
=
do_time
?
time
::
get_time
()
:
{
sec
:
0u32
,
usec
:
0u32
};
let
fcx
=
option
::
none
;
trans_closure
(
cx
,
sp
,
f
,
llfndecl
,
ty_self
,
ty_params
,
id
,
{|
new_fcx
|
fcx
=
option
::
some
(
new_fcx
);});
if
cx
.ccx.sess
.get_opts
()
.debuginfo
{
if
cx
.ccx.sess
.get_opts
()
.
extra_
debuginfo
{
let
item
=
alt
option
::
get
(
cx
.ccx.ast_map
.find
(
id
))
{
ast_map
::
node_item
(
item
)
{
item
}
};
...
...
@@ -5654,7 +5654,7 @@ fn trans_crate(sess: session::session, crate: @ast::crate, tcx: ty::ctxt,
let
td
=
mk_target_data
(
sess
.get_targ_cfg
()
.target_strs.data_layout
);
let
tn
=
mk_type_names
();
let
intrinsics
=
declare_intrinsics
(
llmod
);
if
sess
.get_opts
()
.debuginfo
{
if
sess
.get_opts
()
.
extra_
debuginfo
{
declare_dbg_intrinsics
(
llmod
,
intrinsics
);
}
let
int_type
=
T_int
(
targ_cfg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录