File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -234,12 +234,14 @@ template <class ElemTy> class EquivalenceClasses {
234234 // all other elements in same class to be the successor element.
235235 if (Cur->isLeader () && Next) {
236236 Next->Leader = Cur->Leader ;
237- Next->Next = (const ECValue *)((intptr_t )Next->Next | (intptr_t )1 );
237+ Next->Next = reinterpret_cast <const ECValue *>(
238+ reinterpret_cast <intptr_t >(Next->Next ) | static_cast <intptr_t >(1 ));
239+
238240 const ECValue *newLeader = Next;
239241 while ((Next = Next->getNext ())) {
240242 Next->Leader = newLeader;
241243 }
242- } else {
244+ } else if (!Cur-> isLeader ()) {
243245 const ECValue *Leader = findLeader (V).Node ;
244246 const ECValue *Pre = Leader;
245247 while (Pre->getNext () != Cur) {
@@ -254,8 +256,9 @@ template <class ElemTy> class EquivalenceClasses {
254256 } else {
255257 // If the current element is in the middle of class, then simply
256258 // connect the predecessor element and the successor element.
257- Pre->Next =
258- (const ECValue *)((intptr_t )Next | (intptr_t )Pre->isLeader ());
259+ Pre->Next = reinterpret_cast <const ECValue *>(
260+ reinterpret_cast <intptr_t >(Next) |
261+ static_cast <intptr_t >(Pre->isLeader ()));
259262 Next->Leader = Pre;
260263 }
261264 }
You can’t perform that action at this time.
0 commit comments