return L1 == L2;
}
- void transferTypeErased(const CFGElement *Element, TypeErasedLattice &E,
+ void transferTypeErased(const CFGElement &Element, TypeErasedLattice &E,
Environment &Env) final {
Lattice &L = llvm::any_cast<Lattice &>(E.Value);
- static_cast<Derived *>(this)->transfer(Element, L, Env);
+ // FIXME: change the contract of `transfer` to take a reference.
+ static_cast<Derived *>(this)->transfer(&Element, L, Env);
}
void transferBranchTypeErased(bool Branch, const Stmt *Stmt,
/// Applies the analysis transfer function for a given control flow graph
/// element and type-erased lattice element.
- virtual void transferTypeErased(const CFGElement *, TypeErasedLattice &,
+ virtual void transferTypeErased(const CFGElement &, TypeErasedLattice &,
Environment &) = 0;
/// Applies the analysis transfer function for a given edge from a CFG block
}
// User-provided analysis
- AC.Analysis.transferTypeErased(&Element, State.Lattice, State.Env);
+ AC.Analysis.transferTypeErased(Element, State.Lattice, State.Env);
// Post processing
if (PostVisitCFG) {