mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 21:35:07 +00:00
IR: Make MDNodeFwdDecl destructor public
Now that the leak detector is gone, anyone can call this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225689 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5316023a4e
commit
45db33d634
@ -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