summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-08 21:57:07 +0000
committerDevang Patel <dpatel@apple.com>2009-07-08 21:57:07 +0000
commit2214c94bb70524ff3150c6763c2f9ac0c1bb844b (patch)
tree466cc9d2de4b9b6eae853c3be8ca5064621183ab
parent229509a8bc2390c4c9c1bd20f777acf29911d452 (diff)
Drop "constant" from
!0 = constant metadata !{...} git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75057 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AsmParser/LLParser.cpp4
-rw-r--r--lib/VMCore/AsmWriter.cpp2
-rw-r--r--test/Feature/mdnode2.ll4
-rw-r--r--test/Feature/mdnode3.ll2
-rw-r--r--test/Feature/mdnode4.ll3
-rw-r--r--unittests/VMCore/MetadataTest.cpp8
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());
}
}