]> git.lizzy.rs Git - rust.git/commitdiff
debuginfo: Clear debug source locations at beginning of functions.
authorMichael Woerister <michaelwoerister@gmail>
Fri, 13 Dec 2013 11:04:42 +0000 (12:04 +0100)
committerMichael Woerister <michaelwoerister@gmail>
Mon, 16 Dec 2013 09:23:28 +0000 (10:23 +0100)
src/librustc/middle/trans/debuginfo.rs

index 97d8ed92b4b7a1b457b2bc8f46dc3cf19cd0fa14..71cc6109a47ad5fe93486c057a5cd4c064d1c944 100644 (file)
@@ -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,