Skip to content

Commit d6ccbf6

Browse files
committed
rustc_codegen_llvm: remove unnecessary special-casing of root scopes' children.
1 parent 6cad754 commit d6ccbf6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/librustc_codegen_llvm/debuginfo/create_scope_map.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,8 @@ fn make_mir_scope(
6666
if !has_variables.contains(scope) {
6767
// Do not create a DIScope if there are no variables
6868
// defined in this MIR Scope, to avoid debuginfo bloat.
69-
70-
// However, we don't skip creating a nested scope if
71-
// our parent is the root, because we might want to
72-
// put arguments in the root and not have shadowing.
73-
if parent_scope.scope_metadata.unwrap() != fn_metadata {
74-
debug_context.scopes[scope] = parent_scope;
75-
return;
76-
}
69+
debug_context.scopes[scope] = parent_scope;
70+
return;
7771
}
7872

7973
let loc = span_start(cx, scope_data.span);

0 commit comments

Comments
 (0)