pub enum VariableKind {
ArgumentVariable(usize /*index*/),
LocalVariable,
- CapturedVariable,
}
/// Create any deferred debug metadata nodes
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;
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);
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 */ }
}
}