diff options
| author | Josh Matthews <josh@joshmatthews.net> | 2011-12-14 15:47:05 -0500 |
|---|---|---|
| committer | Josh Matthews <josh@joshmatthews.net> | 2011-12-18 23:48:04 -0500 |
| commit | c6f16ed2c418268f2acbb8728f265b3b960f8efd (patch) | |
| tree | 181c56232f02f06e3ff0658612a5e3fceb5de681 /src/comp/middle/debuginfo.rs | |
| parent | 8597077b7ace2a16b3c6c7c9e37eeb47f758194f (diff) | |
| download | rust-c6f16ed2c418268f2acbb8728f265b3b960f8efd.tar.gz rust-c6f16ed2c418268f2acbb8728f265b3b960f8efd.zip | |
Hide extended, unfinished debug information behind --xg compiler flag.
Diffstat (limited to 'src/comp/middle/debuginfo.rs')
| -rw-r--r-- | src/comp/middle/debuginfo.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/comp/middle/debuginfo.rs b/src/comp/middle/debuginfo.rs index 2c249a64d4a..14cc13e217e 100644 --- a/src/comp/middle/debuginfo.rs +++ b/src/comp/middle/debuginfo.rs @@ -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, |
