Skip to content

Commit

Permalink
Merge pull request #16 from simon-perriard/master
Browse files Browse the repository at this point in the history
  • Loading branch information
LiHRaM authored Apr 25, 2022
2 parents 86a3165 + f0a2249 commit 1c150f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/analysis/taint_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ use rustc_hir::def_id::DefId;
use rustc_index::bit_set::BitSet;
use rustc_middle::{
mir::{
visit::Visitor, BasicBlock, Body, Constant, HasLocalDecls, Local, Location, Operand, Place,
Rvalue, Statement, StatementKind, Terminator, TerminatorKind,
traversal::reverse_postorder, visit::Visitor, BasicBlock, Body, Constant, HasLocalDecls,
Local, Location, Operand, Place, Rvalue, Statement, StatementKind, Terminator,
TerminatorKind,
},
ty::{TyCtxt, TyKind},
};
Expand Down Expand Up @@ -328,7 +329,7 @@ where
.iterate_to_fixpoint()
.into_results_cursor(target_body);

let state = if let Some(last) = target_body.basic_blocks().last() {
let state = if let Some((last, _)) = reverse_postorder(target_body).last() {
results.seek_to_block_end(last);
Some(results.get().clone())
} else {
Expand Down

0 comments on commit 1c150f4

Please sign in to comment.