diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h index 856667d12190..11724603647e 100644 --- a/llvm/include/llvm/ADT/ImmutableSet.h +++ b/llvm/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();