mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Simplify ReachingDefs::RDMap() accessor
This commit is contained in:
parent
5f79cb7668
commit
2c04054975
2 changed files with 10 additions and 13 deletions
|
@ -65,7 +65,7 @@ RDPtr ReachingDefs::Intersect(const RDPtr& r) const
|
|||
|
||||
auto res = make_intrusive<ReachingDefs>();
|
||||
|
||||
for ( const auto& i : *RDMapRef() )
|
||||
for ( const auto& i : *RDMap() )
|
||||
for ( const auto& dp : *i.second )
|
||||
{
|
||||
if ( r->HasPair(i.first, dp) )
|
||||
|
@ -87,7 +87,7 @@ RDPtr ReachingDefs::Union(const RDPtr& r) const
|
|||
|
||||
res->AddRDs(r);
|
||||
|
||||
for ( const auto& i : *RDMapRef() )
|
||||
for ( const auto& i : *RDMap() )
|
||||
for ( const auto& dp : *i.second )
|
||||
res->AddRD(i.first, dp);
|
||||
|
||||
|
@ -102,7 +102,7 @@ RDPtr ReachingDefs::IntersectWithConsolidation(const RDPtr& r,
|
|||
|
||||
auto res = make_intrusive<ReachingDefs>();
|
||||
|
||||
for ( const auto& i : *RDMapRef() )
|
||||
for ( const auto& i : *RDMap() )
|
||||
for ( const auto& dp : *i.second )
|
||||
{
|
||||
if ( r->HasPair(i.first, dp) )
|
||||
|
@ -122,7 +122,7 @@ RDPtr ReachingDefs::IntersectWithConsolidation(const RDPtr& r,
|
|||
bool ReachingDefs::HasPair(const DefinitionItem* di, const DefinitionPoint& dp)
|
||||
const
|
||||
{
|
||||
const auto& map = RDMapRef();
|
||||
const auto& map = RDMap();
|
||||
|
||||
auto l = map->find(di);
|
||||
if ( l == map->end() )
|
||||
|
@ -155,7 +155,7 @@ void ReachingDefs::CopyMapIfNeeded()
|
|||
|
||||
void ReachingDefs::Dump() const
|
||||
{
|
||||
DumpMap(RDMapRef());
|
||||
DumpMap(RDMap());
|
||||
}
|
||||
|
||||
void ReachingDefs::DumpMap(const std::shared_ptr<ReachingDefsMap>& map) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue