From 08bc0721415c54033dbd64934b2b3d10835fce36 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 13 Dec 2013 12:04:42 +0100 Subject: [PATCH] debuginfo: Clear debug source locations at beginning of functions. --- src/librustc/middle/trans/debuginfo.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/librustc/middle/trans/debuginfo.rs b/src/librustc/middle/trans/debuginfo.rs index 97d8ed92b4b..71cc6109a47 100644 --- a/src/librustc/middle/trans/debuginfo.rs +++ b/src/librustc/middle/trans/debuginfo.rs @@ -687,6 +687,9 @@ pub fn create_function_debug_context(cx: &mut CrateContext, let arg_pats = fn_decl.inputs.map(|arg_ref| arg_ref.pat); populate_scope_map(cx, arg_pats, top_level_block, fn_metadata, &mut fn_debug_context.scope_map); + // Clear the debug location so we don't assign them in the function prelude + set_debug_location(cx, UnknownLocation); + return FunctionDebugContext(fn_debug_context); fn get_function_signature(cx: &mut CrateContext,