diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h index 8b2425e4e8fef..1b40dac4d092c 100644 --- a/llvm/include/llvm/ADT/ImmutableSet.h +++ b/llvm/include/llvm/ADT/ImmutableSet.h @@ -635,9 +635,7 @@ class ImutAVLFactory { // if find a collision compare those trees by their contents. unsigned digest = TNew->computeDigest(); TreeTy *&entry = Cache[maskCacheIndex(digest)]; - do { - if (!entry) - break; + if (entry) { for (TreeTy *T = entry ; T != nullptr; T = T->next) { // Compare the Contents('T') with Contents('TNew') typename TreeTy::iterator TI = T->begin(), TE = T->end(); @@ -653,7 +651,6 @@ class ImutAVLFactory { entry->prev = TNew; TNew->next = entry; } - while (false); entry = TNew; TNew->IsCanonicalized = true;