Fix build_value_labels_ranges for newBE when there are no labels
This commit is contained in:
@@ -343,7 +343,7 @@ pub struct MachCompileResult {
|
||||
/// Unwind info.
|
||||
pub unwind_info: Option<unwind_input::UnwindInfo<Reg>>,
|
||||
/// Debug info: value labels to registers/stackslots at code offsets.
|
||||
pub value_labels_ranges: Option<ValueLabelsRanges>,
|
||||
pub value_labels_ranges: ValueLabelsRanges,
|
||||
/// Debug info: stackslots to stack pointer offsets.
|
||||
pub stackslot_offsets: PrimaryMap<StackSlot, u32>,
|
||||
}
|
||||
|
||||
@@ -617,13 +617,13 @@ impl<I: VCodeInst> VCode<I> {
|
||||
}
|
||||
|
||||
/// Generates value-label ranges.
|
||||
pub fn value_labels_ranges(&self) -> Option<ValueLabelsRanges> {
|
||||
pub fn value_labels_ranges(&self) -> ValueLabelsRanges {
|
||||
if !self.has_value_labels {
|
||||
return None;
|
||||
return ValueLabelsRanges::default();
|
||||
}
|
||||
|
||||
let layout = &self.insts_layout.borrow();
|
||||
Some(debug::compute(&self.insts, &layout.0[..], &layout.1[..]))
|
||||
debug::compute(&self.insts, &layout.0[..], &layout.1[..])
|
||||
}
|
||||
|
||||
/// Get the offsets of stackslots.
|
||||
|
||||
Reference in New Issue
Block a user