diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index 856667d1219..11724603647 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -219,9 +219,9 @@ private: // of the last item hash and the the next item. unsigned X = ID.ComputeHash(); - ID.clear(); if (R) { + ID.clear(); ID.AddInteger(X); ID.AddInteger(R->ComputeHash()); X = ID.ComputeHash();