IR: Stop erasing MDNodes from uniquing sets during teardown

Stop erasing `MDNode`s from the uniquing sets in `LLVMContextImpl`
during teardown (in particular, during
`UniquableMDNode::~UniquableMDNode()`).  Although it's currently
feasible, there isn't any clear benefit and it may not be feasible for
other subclasses (which don't explicitly store the lookup hash).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225696 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-01-12 20:50:25 +00:00
parent 9e3e492f03
commit d1ec4f037d
3 changed files with 10 additions and 24 deletions

View File

@@ -722,7 +722,7 @@ protected:
/// resolveCycles() is called).
UniquableMDNode(LLVMContext &C, unsigned ID, ArrayRef<Metadata *> Vals,
bool AllowRAUW);
~UniquableMDNode();
~UniquableMDNode() {}
void storeDistinctInContext();
@@ -767,7 +767,7 @@ class MDTuple : public UniquableMDNode {
MDTuple(LLVMContext &C, ArrayRef<Metadata *> Vals, bool AllowRAUW)
: UniquableMDNode(C, MDTupleKind, Vals, AllowRAUW) {}
~MDTuple();
~MDTuple() { dropAllReferences(); }
void setHash(unsigned Hash) { MDNodeSubclassData = Hash; }
void recalculateHash();