[PATCH] D25645: [ADT] Add CachedHashString.

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 15:32:18 PDT 2016

timshen added inline comments.

Comment at: llvm/include/llvm/ADT/CachedHashString.h:117
+  CachedHashString &operator=(const CachedHashString &Other) {
+    if (!isEmptyOrTombstone())
+      delete[] P;
How do you feel about this:
  if (this != Other) {
    new (this) CachedHashString(Other);
  return *this;

Likewise for the move assign.


More information about the llvm-commits mailing list