Skip to content

Commit

Permalink
Fix Rust apply_to_linear_object logic applying non basic block backed…
Browse files Browse the repository at this point in the history
… disasm lines
  • Loading branch information
emesare committed Feb 3, 2025
1 parent 160ae4e commit 07dec29
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rust/src/render_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,9 @@ pub trait RenderLayer: Sized {
Some((probe_line.ty, probe_line.basic_block.to_owned(), line_block))
})
.flat_map(|(line_ty, basic_block, lines)| {
match line_ty {
LinearDisassemblyLineType::CodeDisassemblyLineType => {
match (basic_block, line_ty) {
(Some(block), LinearDisassemblyLineType::CodeDisassemblyLineType) => {
// Dealing with code lines.
let block = basic_block.expect("Code line has no basic block");
let function = block.function();
let text_lines = lines.into_iter().map(|line| line.contents).collect();
let new_text_lines = self.apply_to_block(&block, text_lines);
Expand Down

0 comments on commit 07dec29

Please sign in to comment.