diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | d39c594d39df7f283c2fb8a704a3f31c501180d9 (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /unittests/VMCore/MetadataTest.cpp | |
parent | 6144c1de6a7674dad94290650e4e14f24d42e421 (diff) |
Notes
Diffstat (limited to 'unittests/VMCore/MetadataTest.cpp')
-rw-r--r-- | unittests/VMCore/MetadataTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/unittests/VMCore/MetadataTest.cpp b/unittests/VMCore/MetadataTest.cpp index 04db486cd8710..942b848232507 100644 --- a/unittests/VMCore/MetadataTest.cpp +++ b/unittests/VMCore/MetadataTest.cpp @@ -130,11 +130,12 @@ TEST(NamedMDNodeTest, Search) { MDNode *n = MDNode::get(Context, &V, 1); MDNode *n2 = MDNode::get(Context, &V2, 1); - MDNode *Nodes[2] = { n, n2 }; - Module M("MyModule", Context); const char *Name = "llvm.NMD1"; - NamedMDNode *NMD = NamedMDNode::Create(Context, Name, &Nodes[0], 2, &M); + NamedMDNode *NMD = M.getOrInsertNamedMetadata(Name); + NMD->addOperand(n); + NMD->addOperand(n2); + std::string Str; raw_string_ostream oss(Str); NMD->print(oss); |