about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@gmail>2013-12-13 12:04:42 +0100
committerMichael Woerister <michaelwoerister@gmail>2013-12-16 10:23:28 +0100
commit08bc0721415c54033dbd64934b2b3d10835fce36 (patch)
tree324af9e021b7f5d339dc6ca7efa672823859345f /src
parentae6628573282855a9b93de266add64c69411b0b0 (diff)
downloadrust-08bc0721415c54033dbd64934b2b3d10835fce36.tar.gz
rust-08bc0721415c54033dbd64934b2b3d10835fce36.zip
debuginfo: Clear debug source locations at beginning of functions.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/middle/trans/debuginfo.rs3
1 files changed, 3 insertions, 0 deletions
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,