diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-05-21 18:30:55 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-05-21 20:39:59 +0300 |
| commit | a8ceab9cd78aa276ac988866be8344e92322e09c (patch) | |
| tree | 8ec60757b50d0e72f167d8cb383e4c25c1d0c7d0 | |
| parent | 98686ca2944db341b0933e341b1e9029a905e322 (diff) | |
| download | rust-a8ceab9cd78aa276ac988866be8344e92322e09c.tar.gz rust-a8ceab9cd78aa276ac988866be8344e92322e09c.zip | |
rustc_codegen_llvm: remove debuginfo::VariableKind::CapturedVariable.
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/mod.rs | 12 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/mir/mod.rs | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/mod.rs b/src/librustc_codegen_llvm/debuginfo/mod.rs index 294d8cbbd93..803966145f7 100644 --- a/src/librustc_codegen_llvm/debuginfo/mod.rs +++ b/src/librustc_codegen_llvm/debuginfo/mod.rs @@ -147,7 +147,6 @@ pub enum VariableAccess<'a> { pub enum VariableKind { ArgumentVariable(usize /*index*/), LocalVariable, - CapturedVariable, } /// Create any deferred debug metadata nodes @@ -478,6 +477,7 @@ pub fn declare_local<'a, 'tcx>(bx: &Builder<'a, 'tcx>, variable_access: VariableAccess, variable_kind: VariableKind, span: Span) { + assert!(!dbg_context.get_ref(span).source_locations_enabled.get()); let cx = bx.cx; let file = span_start(cx, span).file; @@ -490,8 +490,7 @@ pub fn declare_local<'a, 'tcx>(bx: &Builder<'a, 'tcx>, let (argument_index, dwarf_tag) = match variable_kind { ArgumentVariable(index) => (index as c_uint, DW_TAG_arg_variable), - LocalVariable | - CapturedVariable => (0, DW_TAG_auto_variable) + LocalVariable => (0, DW_TAG_auto_variable) }; let align = cx.align_of(variable_type); @@ -529,14 +528,7 @@ pub fn declare_local<'a, 'tcx>(bx: &Builder<'a, 'tcx>, llvm::LLVMSetInstDebugLocation(bx.llbuilder, instr); } - } - } - - match variable_kind { - ArgumentVariable(_) | CapturedVariable => { - assert!(!dbg_context.get_ref(span).source_locations_enabled.get()); source_loc::set_debug_location(bx, UnknownLocation); } - _ => { /* nothing to do */ } } } diff --git a/src/librustc_codegen_llvm/mir/mod.rs b/src/librustc_codegen_llvm/mir/mod.rs index 47b15320311..a91a6e251aa 100644 --- a/src/librustc_codegen_llvm/mir/mod.rs +++ b/src/librustc_codegen_llvm/mir/mod.rs @@ -634,7 +634,7 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, ty, scope, variable_access, - VariableKind::CapturedVariable, + VariableKind::LocalVariable, DUMMY_SP ); } |
