Skip to content

Commit 08bc072

Browse files
debuginfo: Clear debug source locations at beginning of functions.
1 parent ae66285 commit 08bc072

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc/middle/trans/debuginfo.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,9 @@ pub fn create_function_debug_context(cx: &mut CrateContext,
687687
let arg_pats = fn_decl.inputs.map(|arg_ref| arg_ref.pat);
688688
populate_scope_map(cx, arg_pats, top_level_block, fn_metadata, &mut fn_debug_context.scope_map);
689689

690+
// Clear the debug location so we don't assign them in the function prelude
691+
set_debug_location(cx, UnknownLocation);
692+
690693
return FunctionDebugContext(fn_debug_context);
691694

692695
fn get_function_signature(cx: &mut CrateContext,

0 commit comments

Comments
 (0)