diff options
| author | Michael Woerister <michaelwoerister@gmail> | 2013-12-13 15:16:05 +0100 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@gmail> | 2013-12-16 10:23:28 +0100 |
| commit | b0100c5a0f43b5a2fadf839d90b6174dbddd0547 (patch) | |
| tree | 3f955b715424c2bfa9009be781ab0854fdba3738 /src | |
| parent | 69f4bf79b2cc30ac518218d05bccbc84157b0694 (diff) | |
debuginfo: Set the is_local_to_unit attribute of functions correctly
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/middle/trans/debuginfo.rs | 3 | ||||
| -rw-r--r-- | src/test/debug-info/basic-types-metadata.rs | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs index 631f32fcd68..9aaaf27b345 100644 --- a/src/librustc/middle/trans/debuginfo.rs +++ b/src/librustc/middle/trans/debuginfo.rs @@ -653,6 +653,7 @@ pub fn create_function_debug_context(cx: &mut CrateContext, // Clang sets this parameter to the opening brace of the function's block, so let's do this too. let scope_line = span_start(cx, top_level_block.span).line; + let is_local_to_unit = !cx.reachable.contains(&fn_ast_id); let fn_metadata = function_name.with_c_str(|function_name| { linkage_name.with_c_str(|linkage_name| { @@ -665,7 +666,7 @@ pub fn create_function_debug_context(cx: &mut CrateContext, file_metadata, loc.line as c_uint, function_type_metadata, - false, + is_local_to_unit, true, scope_line as c_uint, FlagPrototyped as c_uint, diff --git a/src/test/debug-info/basic-types-metadata.rs b/src/test/debug-info/basic-types-metadata.rs index 18683102b2a..0e48b5db7ce 100644 --- a/src/test/debug-info/basic-types-metadata.rs +++ b/src/test/debug-info/basic-types-metadata.rs @@ -45,8 +45,7 @@ // debugger:whatis f64 // check:type = f64 // debugger:info functions _yyy -// check:[...] -// check:![...]_yyy()(); +// check:[...]![...]_yyy()(); // debugger:detach // debugger:quit |
