Fix a memory correctness error noticed by valgrind (harmless in practice).
[oota-llvm.git] / include / llvm / Support / StringPool.h
index 1f3d8a0f0a77a8b12a7a5e395e5c1cf38493270e..8661f60e2ef9665e41ea68c3aec916e19ccdce11 100644 (file)
@@ -110,7 +110,7 @@ namespace llvm {
         return;
       if (--S->getValue().Refcount == 0) {
         S->getValue().Pool->InternTable.remove(S);
-        delete S;
+        S->Destroy();
       }
       S = 0;
     }