PR9214: Convert Metadata API to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jay Foad
2011-04-21 19:59:31 +00:00
parent ae5fbeec23
commit ec9186bcf9
10 changed files with 58 additions and 66 deletions

View File

@ -87,10 +87,10 @@ TEST_F(MDNodeTest, Simple) {
V.push_back(CI);
V.push_back(s2);
MDNode *n1 = MDNode::get(Context, &V[0], 3);
MDNode *n1 = MDNode::get(Context, V);
Value *const c1 = n1;
MDNode *n2 = MDNode::get(Context, &c1, 1);
MDNode *n3 = MDNode::get(Context, &V[0], 3);
MDNode *n2 = MDNode::get(Context, c1);
MDNode *n3 = MDNode::get(Context, V);
EXPECT_NE(n1, n2);
#ifdef ENABLE_MDNODE_UNIQUING
EXPECT_EQ(n1, n3);
@ -112,7 +112,7 @@ TEST_F(MDNodeTest, Delete) {
Instruction *I = new BitCastInst(C, Type::getInt32Ty(getGlobalContext()));
Value *const V = I;
MDNode *n = MDNode::get(Context, &V, 1);
MDNode *n = MDNode::get(Context, V);
WeakVH wvh = n;
EXPECT_EQ(n, wvh);
@ -127,8 +127,8 @@ TEST(NamedMDNodeTest, Search) {
Value *const V = C;
Value *const V2 = C2;
MDNode *n = MDNode::get(Context, &V, 1);
MDNode *n2 = MDNode::get(Context, &V2, 1);
MDNode *n = MDNode::get(Context, V);
MDNode *n2 = MDNode::get(Context, V2);
Module M("MyModule", Context);
const char *Name = "llvm.NMD1";