llvm.org GIT mirror llvm / 2214c94
Drop "constant" from !0 = constant metadata !{...} git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75057 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 10 years ago
6 changed file(s) with 11 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
376376 return true;
377377
378378 LocTy TyLoc;
379 bool IsConstant;
380379 PATypeHolder Ty(Type::VoidTy);
381 if (ParseGlobalType(IsConstant) ||
382 ParseType(Ty, TyLoc))
380 if (ParseType(Ty, TyLoc))
383381 return true;
384382
385383 Constant *Init = 0;
826826 Nodes[I->second] = cast(I->first);
827827
828828 for (unsigned i = 0, e = Nodes.size(); i != e; ++i) {
829 Out << '!' << i << " = constant metadata ";
829 Out << '!' << i << " = metadata ";
830830 const MDNode *Node = Nodes[i];
831831 Out << "!{";
832832 for (MDNode::const_elem_iterator NI = Node->elem_begin(),
22 ; RUN: grep "metadata !{i32 21, i32 22}" %t.ll
33 ; RUN: grep "metadata !{i32 23, i32 24}" %t.ll
44
5 !0 = constant metadata !{i32 21, i32 22}
6 !1 = constant metadata !{i32 23, i32 24}
5 !0 = metadata !{i32 21, i32 22}
6 !1 = metadata !{i32 23, i32 24}
77 @llvm.blah = constant metadata !{i32 1000, i16 200, metadata !1, metadata !0}
0 ; RUN: llvm-as < %s | llvm-dis | llvm-as -f -o /dev/null
1 !0 = constant metadata !{i32 21, i32 22}
1 !0 = metadata !{i32 21, i32 22}
22 @llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0, metadata !0}
11 ; RUN: llvm-as < %s | llvm-dis -f -o /dev/null
22
33 @llvm.blah = constant metadata !{metadata !1}
4 !1 = constant metadata !{i32 23, i32 24}
4 !1 = metadata !{i32 23, i32 24}
5
9393 std::ostringstream oss1, oss2;
9494 n1->print(oss1);
9595 n2->print(oss2);
96 EXPECT_STREQ("!0 = constant metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n",
96 EXPECT_STREQ("!0 = metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n",
9797 oss1.str().c_str());
98 EXPECT_STREQ("!0 = constant metadata !{metadata !1}\n"
99 "!1 = constant metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n",
98 EXPECT_STREQ("!0 = metadata !{metadata !1}\n"
99 "!1 = metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n",
100100 oss2.str().c_str());
101101 }
102102
133133
134134 std::ostringstream oss;
135135 wvh->print(oss);
136 EXPECT_STREQ("!0 = constant metadata !{null}\n", oss.str().c_str());
136 EXPECT_STREQ("!0 = metadata !{null}\n", oss.str().c_str());
137137 }
138138 }