File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,10 @@ class irept
102
102
bool is_nil () const { return id ()==ID_nil; }
103
103
bool is_not_nil () const { return id ()!=ID_nil; }
104
104
105
- explicit irept (const irep_idt &_id):data(&empty_d)
105
+ explicit irept (const irep_idt &_id)
106
+ #ifdef SHARING
107
+ :data(&empty_d)
108
+ #endif
106
109
{
107
110
id (_id);
108
111
}
Original file line number Diff line number Diff line change @@ -20,16 +20,19 @@ class merged_irept:public irept
20
20
{
21
21
// We assume that both are in the same container,
22
22
// which isn't checked.
23
- return data== other.data ;
23
+ return & read ()==& other.read () ;
24
24
}
25
25
26
26
bool operator <(const merged_irept &other) const
27
27
{
28
28
// again, assumes that both are in the same container
29
- return ((std:: size_t )data)<((std:: size_t ) other.data );
29
+ return & read ()<& other.read ( );
30
30
}
31
31
32
- std::size_t hash () const { return (std::size_t )data; }
32
+ std::size_t hash () const
33
+ {
34
+ return reinterpret_cast <std::size_t >(&read ());
35
+ }
33
36
34
37
// copy constructor: will only copy from other merged_irepts
35
38
merged_irept (const merged_irept &_src):irept(_src)
You can’t perform that action at this time.
0 commit comments