aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-21 18:54:18 +0000
committerDan Gohman <gohman@apple.com>2010-07-21 18:54:18 +0000
commit872814ae048df032bddf9299c850f5bda08299a9 (patch)
tree8abc3d283bd51ea3430c80b7c69f84b8e6067010 /lib/AsmParser
parentec237ffd28f1408f524dc134220d8502e167f4d9 (diff)
downloadexternal_llvm-872814ae048df032bddf9299c850f5bda08299a9.zip
external_llvm-872814ae048df032bddf9299c850f5bda08299a9.tar.gz
external_llvm-872814ae048df032bddf9299c850f5bda08299a9.tar.bz2
Disallow null as a named metadata operand.
Make MDNode::destroy private. Fix the one thing that used MDNode::destroy, outside of MDNode itself. One should never delete or destroy an MDNode explicitly. MDNodes implicitly go away when there are no references to them (implementation details aside). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 221b994..06229d7 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -546,12 +546,6 @@ bool LLParser::ParseNamedMetadata() {
SmallVector<MDNode *, 8> Elts;
if (Lex.getKind() != lltok::rbrace)
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;