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:
parent
369ae03621
commit
b385d06cfc
@ -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…
x
Reference in New Issue
Block a user