forked from OSchip/llvm-project
IR: Make MDNodeFwdDecl destructor public
Now that the leak detector is gone, anyone can call this. llvm-svn: 225689
This commit is contained in:
parent
b4b05017cf
commit
b565b10956
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue