diff options
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 4 | ||||
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 2 | ||||
-rw-r--r-- | test/Feature/mdnode2.ll | 4 | ||||
-rw-r--r-- | test/Feature/mdnode3.ll | 2 | ||||
-rw-r--r-- | test/Feature/mdnode4.ll | 3 | ||||
-rw-r--r-- | unittests/VMCore/MetadataTest.cpp | 8 |
6 files changed, 11 insertions, 12 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 44eb5b81cf..2f25b77706 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -377,10 +377,8 @@ bool LLParser::ParseStandaloneMetadata() { return true; LocTy TyLoc; - bool IsConstant; PATypeHolder Ty(Type::VoidTy); - if (ParseGlobalType(IsConstant) || - ParseType(Ty, TyLoc)) + if (ParseType(Ty, TyLoc)) return true; Constant *Init = 0; diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index f13d39d12e..face5a192a 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -827,7 +827,7 @@ static void WriteMDNodes(raw_ostream &Out, TypePrinting &TypePrinter, Nodes[I->second] = cast<MDNode>(I->first); for (unsigned i = 0, e = Nodes.size(); i != e; ++i) { - Out << '!' << i << " = constant metadata "; + Out << '!' << i << " = metadata "; const MDNode *Node = Nodes[i]; Out << "!{"; for (MDNode::const_elem_iterator NI = Node->elem_begin(), diff --git a/test/Feature/mdnode2.ll b/test/Feature/mdnode2.ll index 1fb9c4a67d..23e6318a8d 100644 --- a/test/Feature/mdnode2.ll +++ b/test/Feature/mdnode2.ll @@ -3,6 +3,6 @@ ; RUN: grep "metadata !{i32 21, i32 22}" %t.ll ; RUN: grep "metadata !{i32 23, i32 24}" %t.ll -!0 = constant metadata !{i32 21, i32 22} -!1 = constant metadata !{i32 23, i32 24} +!0 = metadata !{i32 21, i32 22} +!1 = metadata !{i32 23, i32 24} @llvm.blah = constant metadata !{i32 1000, i16 200, metadata !1, metadata !0} diff --git a/test/Feature/mdnode3.ll b/test/Feature/mdnode3.ll index fc61ae24cc..ecb280c8a0 100644 --- a/test/Feature/mdnode3.ll +++ b/test/Feature/mdnode3.ll @@ -1,3 +1,3 @@ ; RUN: llvm-as < %s | llvm-dis | llvm-as -f -o /dev/null -!0 = constant metadata !{i32 21, i32 22} +!0 = metadata !{i32 21, i32 22} @llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0, metadata !0} diff --git a/test/Feature/mdnode4.ll b/test/Feature/mdnode4.ll index c054949100..cf4c6e92d3 100644 --- a/test/Feature/mdnode4.ll +++ b/test/Feature/mdnode4.ll @@ -2,4 +2,5 @@ ; RUN: llvm-as < %s | llvm-dis -f -o /dev/null @llvm.blah = constant metadata !{metadata !1} -!1 = constant metadata !{i32 23, i32 24} +!1 = metadata !{i32 23, i32 24} + diff --git a/unittests/VMCore/MetadataTest.cpp b/unittests/VMCore/MetadataTest.cpp index 0abd8aca4c..fcc9c6435a 100644 --- a/unittests/VMCore/MetadataTest.cpp +++ b/unittests/VMCore/MetadataTest.cpp @@ -94,10 +94,10 @@ TEST(MDNodeTest, Simple) { std::ostringstream oss1, oss2; n1->print(oss1); n2->print(oss2); - EXPECT_STREQ("!0 = constant metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n", + EXPECT_STREQ("!0 = metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n", oss1.str().c_str()); - EXPECT_STREQ("!0 = constant metadata !{metadata !1}\n" - "!1 = constant metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n", + EXPECT_STREQ("!0 = metadata !{metadata !1}\n" + "!1 = metadata !{metadata !\"abc\", i8 0, metadata !\"123\"}\n", oss2.str().c_str()); } @@ -134,6 +134,6 @@ TEST(MDNodeTest, Delete) { std::ostringstream oss; wvh->print(oss); - EXPECT_STREQ("!0 = constant metadata !{null}\n", oss.str().c_str()); + EXPECT_STREQ("!0 = metadata !{null}\n", oss.str().c_str()); } } |