- FunctionDebugContext {
- debug_context,
- entry_id,
- symbol: func_id.as_u32() as usize,
- instance,
- mir,
- }
- }
-
- fn define_local(&mut self, name: String, ty: Ty<'tcx>) -> UnitEntryId {
- let dw_ty = self.debug_context.dwarf_ty(ty);
-
- let var_id = self
- .debug_context
- .dwarf
- .unit
- .add(self.entry_id, gimli::DW_TAG_variable);
- let var_entry = self.debug_context.dwarf.unit.get_mut(var_id);
-
- var_entry.set(gimli::DW_AT_name, AttributeValue::String(name.into_bytes()));
- var_entry.set(gimli::DW_AT_type, AttributeValue::UnitRef(dw_ty));
-
- var_id
- }
-
- pub(crate) fn define(
- &mut self,
- context: &Context,
- isa: &dyn TargetIsa,
- source_info_set: &indexmap::IndexSet<SourceInfo>,
- local_map: FxHashMap<mir::Local, CPlace<'tcx>>,
- ) {
- let end = self.create_debug_lines(context, isa, source_info_set);
+ let end = self.create_debug_lines(isa, symbol, entry_id, context, mir.span, source_info_set);