debuginfo: Set the is_local_to_unit attribute of functions correctly

This commit is contained in:
Michael Woerister 2013-12-13 15:16:05 +01:00
parent 69f4bf79b2
commit b0100c5a0f
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -45,8 +45,7 @@
// debugger:whatis f64
// check:type = f64
// debugger:info functions _yyy
// check:[...]
// check:![...]_yyy()();
// check:[...]![...]_yyy()();
// debugger:detach
// debugger:quit