Skip to content

Commit 617c78c

Browse files
author
martin
committed
Use sharing_mapt for abstract environment
1 parent 7d02492 commit 617c78c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/util/sharing_map.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ class sharing_mapt
414414
///
415415
/// \param [out] view: Empty view
416416
void get_view(viewt &view) const;
417+
viewt get_view() const
418+
{
419+
viewt result;
420+
get_view(result);
421+
return result;
422+
}
417423

418424
/// Get a delta view of the elements in the map
419425
///

src/util/std_expr.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ class symbol_exprt : public nullary_exprt
114114
}
115115
};
116116

117+
namespace std {
118+
template<> struct hash<::symbol_exprt>
119+
{
120+
size_t operator()(const ::symbol_exprt& sym)
121+
{
122+
return irep_id_hash()(sym.get_identifier());
123+
}
124+
};
125+
}
126+
117127
/// Expression to hold a symbol (variable) with extra accessors to
118128
/// ID_c_static_lifetime and ID_C_thread_local
119129
class decorated_symbol_exprt:public symbol_exprt

0 commit comments

Comments
 (0)