1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 13:11:39 +01:00

IR: Make MDNodeFwdDecl destructor public

Now that the leak detector is gone, anyone can call this.

llvm-svn: 225689
This commit is contained in:
Duncan P. N. Exon Smith 2015-01-12 20:19:54 +00:00
parent 369ae03621
commit b385d06cfc
2 changed files with 7 additions and 1 deletions

View File

@ -818,9 +818,11 @@ class MDNodeFwdDecl : public MDNode, ReplaceableMetadataImpl {
MDNodeFwdDecl(LLVMContext &C, ArrayRef<Metadata *> Vals)
: MDNode(C, MDNodeFwdDeclKind, Vals) {}
~MDNodeFwdDecl() { dropAllReferences(); }
public:
~MDNodeFwdDecl() { dropAllReferences(); }
using MDNode::operator delete;
static bool classof(const Metadata *MD) {
return MD->getMetadataID() == MDNodeFwdDeclKind;
}

View File

@ -129,6 +129,10 @@ TEST_F(MDNodeTest, Delete) {
delete I;
}
TEST_F(MDNodeTest, DeleteMDNodeFwdDecl) {
delete MDNode::getTemporary(Context, None);
}
TEST_F(MDNodeTest, SelfReference) {
// !0 = !{!0}
// !1 = !{!0}