diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-07-22 19:23:39 +0300 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2018-07-25 06:38:19 +0300 |
| commit | 145155dc96757002c7b2e9de8489416e2fdbbd57 (patch) | |
| tree | 1f17f8184ace880aad66fb6d9d4562a1a48fe652 /src/librustc_codegen_llvm/debuginfo | |
| parent | a54401ebccc5497497b669a1c48fabdf7351d7b2 (diff) | |
| download | rust-145155dc96757002c7b2e9de8489416e2fdbbd57.tar.gz rust-145155dc96757002c7b2e9de8489416e2fdbbd57.zip | |
parameterize `BitVector` and `BitMatrix` by their index types
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/create_scope_map.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs b/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs index 9ced0f5f4ec..fcde7f9bbc3 100644 --- a/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs +++ b/src/librustc_codegen_llvm/debuginfo/create_scope_map.rs @@ -65,7 +65,7 @@ pub fn create_mir_scopes(cx: &CodegenCx, mir: &Mir, debug_context: &FunctionDebu let mut has_variables = BitVector::new(mir.source_scopes.len()); for var in mir.vars_iter() { let decl = &mir.local_decls[var]; - has_variables.insert(decl.visibility_scope.index()); + has_variables.insert(decl.visibility_scope); } // Instantiate all scopes. @@ -79,7 +79,7 @@ pub fn create_mir_scopes(cx: &CodegenCx, mir: &Mir, debug_context: &FunctionDebu fn make_mir_scope(cx: &CodegenCx, mir: &Mir, - has_variables: &BitVector, + has_variables: &BitVector<SourceScope>, debug_context: &FunctionDebugContextData, scope: SourceScope, scopes: &mut IndexVec<SourceScope, MirDebugScope>) { @@ -102,7 +102,7 @@ fn make_mir_scope(cx: &CodegenCx, return; }; - if !has_variables.contains(scope.index()) { + if !has_variables.contains(scope) { // Do not create a DIScope if there are no variables // defined in this MIR Scope, to avoid debuginfo bloat. |
