diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-05 05:47:09 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-05 05:47:09 +0000 |
commit | c8cfa30ca5e6ce80e3e6e1dbff5d24d266d43d27 (patch) | |
tree | 521b36c543957d1d535109727fc3cca979183943 /include | |
parent | b5c4239606d3b34b5aac20b93d4c052ac4c39ce7 (diff) | |
download | external_llvm-c8cfa30ca5e6ce80e3e6e1dbff5d24d266d43d27.zip external_llvm-c8cfa30ca5e6ce80e3e6e1dbff5d24d266d43d27.tar.gz external_llvm-c8cfa30ca5e6ce80e3e6e1dbff5d24d266d43d27.tar.bz2 |
Free MDNodes when the LLVMContext is destroyed. Leak found by Valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Metadata.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h index e536322..cecb7da 100644 --- a/include/llvm/Metadata.h +++ b/include/llvm/Metadata.h @@ -108,9 +108,6 @@ class MDNode : public Value, public FoldingSetNode { /// node with T. void replaceOperand(MDNodeOperand *Op, Value *NewVal); ~MDNode(); - /// replaceAllOperandsWithNull - This is used while destroying llvm context to - /// gracefully delete all nodes. This method replaces all operands with null. - void replaceAllOperandsWithNull(); protected: explicit MDNode(LLVMContext &C, Value *const *Vals, unsigned NumVals, @@ -166,9 +163,7 @@ private: bool isNotUniqued() const { return (getSubclassDataFromValue() & NotUniquedBit) != 0; } - void setIsNotUniqued() { - setValueSubclassData(getSubclassDataFromValue() | NotUniquedBit); - } + void setIsNotUniqued(); // Shadow Value::setValueSubclassData with a private forwarding method so that // any future subclasses cannot accidentally use it. |