mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Remove a memory leak from MetadataTest.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98412 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -132,9 +132,9 @@ TEST(NamedMDNodeTest, Search) {
|
|||||||
|
|
||||||
MDNode *Nodes[2] = { n, n2 };
|
MDNode *Nodes[2] = { n, n2 };
|
||||||
|
|
||||||
Module *M = new Module("MyModule", Context);
|
Module M("MyModule", Context);
|
||||||
const char *Name = "llvm.NMD1";
|
const char *Name = "llvm.NMD1";
|
||||||
NamedMDNode *NMD = NamedMDNode::Create(Context, Name, &Nodes[0], 2, M);
|
NamedMDNode *NMD = NamedMDNode::Create(Context, Name, &Nodes[0], 2, &M);
|
||||||
std::string Str;
|
std::string Str;
|
||||||
raw_string_ostream oss(Str);
|
raw_string_ostream oss(Str);
|
||||||
NMD->print(oss);
|
NMD->print(oss);
|
||||||
|
Reference in New Issue
Block a user