summaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-13 19:33:27 +0000
committerDan Gohman <gohman@apple.com>2010-07-13 19:33:27 +0000
commitac80975ea4103fcceab38cde69d98d3fb3b01db4 (patch)
tree85c4c423ff223892d372ed3b3446f9859e945520 /lib/AsmParser/LLParser.cpp
parent218977b53eb215e5534db2f727d109ab18817cc1 (diff)
downloadexternal_llvm-ac80975ea4103fcceab38cde69d98d3fb3b01db4.zip
external_llvm-ac80975ea4103fcceab38cde69d98d3fb3b01db4.tar.gz
external_llvm-ac80975ea4103fcceab38cde69d98d3fb3b01db4.tar.bz2
Add support for empty metadata nodes: !{}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r--lib/AsmParser/LLParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 6752181..8c4d734 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -3983,6 +3983,10 @@ int LLParser::ParseInsertValue(Instruction *&Inst, PerFunctionState &PFS) {
/// ::= 'null' | TypeAndValue
bool LLParser::ParseMDNodeVector(SmallVectorImpl<Value*> &Elts,
PerFunctionState *PFS) {
+ // Check for an empty list.
+ if (Lex.getKind() == lltok::rbrace)
+ return false;
+
do {
// Null is a special case since it is typeless.
if (EatIfPresent(lltok::kw_null)) {