about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-07-22 19:23:39 +0300
committerNiko Matsakis <niko@alum.mit.edu>2018-07-25 06:38:19 +0300
commit145155dc96757002c7b2e9de8489416e2fdbbd57 (patch)
tree1f17f8184ace880aad66fb6d9d4562a1a48fe652 /src/librustc_codegen_llvm/debuginfo
parenta54401ebccc5497497b669a1c48fabdf7351d7b2 (diff)
downloadrust-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.rs6
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.