diff options
author | Devang Patel <dpatel@apple.com> | 2010-01-05 21:47:32 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-01-05 21:47:32 +0000 |
commit | 69d02e0a174151e0f129731452e819b91d1ab90e (patch) | |
tree | 490d8aa9eadf369e637c7721fe098eb11c746f42 /lib/AsmParser/LLParser.cpp | |
parent | 6ae68a28b9c277e2e938e3520d0177bacbf57250 (diff) | |
download | external_llvm-69d02e0a174151e0f129731452e819b91d1ab90e.zip external_llvm-69d02e0a174151e0f129731452e819b91d1ab90e.tar.gz external_llvm-69d02e0a174151e0f129731452e819b91d1ab90e.tar.bz2 |
Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92783 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index ca001c1..99ddeb6 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -512,6 +512,12 @@ bool LLParser::ParseNamedMetadata() { SmallVector<MDNode *, 8> Elts; do { + // Null is a special case since it is typeless. + if (EatIfPresent(lltok::kw_null)) { + Elts.push_back(0); + continue; + } + if (ParseToken(lltok::exclaim, "Expected '!' here")) return true; |