diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-08-21 15:07:23 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-08-21 15:07:23 +0000 |
commit | 9dd3e92e1d73b8aee01861b22447898cba9f89bc (patch) | |
tree | 07ae94a13cc9217409b2336b8ad3fd1fd6fbb30d /lib/VMCore | |
parent | da0bfcdaf95d95a66e306ef6d45f638939272d34 (diff) | |
download | external_llvm-9dd3e92e1d73b8aee01861b22447898cba9f89bc.zip external_llvm-9dd3e92e1d73b8aee01861b22447898cba9f89bc.tar.gz external_llvm-9dd3e92e1d73b8aee01861b22447898cba9f89bc.tar.bz2 |
Use MDNode::destroy(). Fixes a delete/free mismatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Metadata.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp index 909c33d..bccdafa 100644 --- a/lib/VMCore/Metadata.cpp +++ b/lib/VMCore/Metadata.cpp @@ -263,10 +263,8 @@ void MDNode::deleteTemporary(MDNode *N) { "Temporary MDNode does not have NotUniquedBit set!"); assert((N->getSubclassDataFromValue() & DestroyFlag) == 0 && "Temporary MDNode has DestroyFlag set!"); - N->setValueSubclassData(N->getSubclassDataFromValue() | - DestroyFlag); LeakDetector::removeGarbageObject(N); - delete N; + N->destroy(); } /// getOperand - Return specified operand. |