Skip to content

Commit

Permalink
Clear the local scope data
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusAdam committed Jul 27, 2024
1 parent c0b934b commit 95be3e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/flowistry_pdg_construction/src/body_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc_hir::{
use rustc_macros::{Decodable, Encodable, TyDecodable, TyEncodable};
use rustc_middle::{
hir::{map::Map, nested_filter::OnlyBodies},
mir::Body,
mir::{Body, ClearCrossCrate},
ty::TyCtxt,
};
use rustc_serialize::{Decodable, Encodable};
Expand Down Expand Up @@ -123,12 +123,16 @@ impl<'tcx> intravisit::Visitor<'tcx> for DumpingVisitor<'tcx> {
_: rustc_span::Span,
local_def_id: rustc_hir::def_id::LocalDefId,
) {
let body_with_facts = rustc_borrowck::consumers::get_body_with_borrowck_facts(
let mut body_with_facts = rustc_borrowck::consumers::get_body_with_borrowck_facts(
self.tcx,
local_def_id,
ConsumerOptions::PoloniusInputFacts,
);

for scope in body_with_facts.body.source_scopes.iter_mut() {
scope.local_data = ClearCrossCrate::Clear;
}

let to_write = CachedBody {
body: body_with_facts.body,
input_facts: FlowistryFacts {
Expand Down

0 comments on commit 95be3e2

Please sign in to comment.