about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2020-02-08 17:58:00 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2020-02-08 17:58:00 +0200
commitd6ccbf6ff80ce66884ab70fdb679353245f05e5b (patch)
tree67ed7574939143d66ea9c111a350f156d760d273
parent6cad7542da2f10e2110f942de4db59716bacb3df (diff)
downloadrust-d6ccbf6ff80ce66884ab70fdb679353245f05e5b.tar.gz
rust-d6ccbf6ff80ce66884ab70fdb679353245f05e5b.zip
rustc_codegen_llvm: remove unnecessary special-casing of root scopes' children.
-rw-r--r--src/librustc_codegen_llvm/debuginfo/create_scope_map.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs b/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs
index eba05ed5d77..cdb9657e1ff 100644
--- a/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs
+++ b/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs
@@ -66,14 +66,8 @@ fn make_mir_scope(
     if !has_variables.contains(scope) {
         // Do not create a DIScope if there are no variables
         // defined in this MIR Scope, to avoid debuginfo bloat.
-
-        // However, we don't skip creating a nested scope if
-        // our parent is the root, because we might want to
-        // put arguments in the root and not have shadowing.
-        if parent_scope.scope_metadata.unwrap() != fn_metadata {
-            debug_context.scopes[scope] = parent_scope;
-            return;
-        }
+        debug_context.scopes[scope] = parent_scope;
+        return;
     }
 
     let loc = span_start(cx, scope_data.span);