summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit093cb79d4bcbe3cb8fd0bda40137e2c9415b67f1 (patch)
tree0a0fd9c767b4815db39b20d0ac7599c879b02832 /llvm/lib/AsmParser
parent99d2cf48382061d77de2c990b6f39babf74e4fca (diff)
downloadbcm5719-llvm-093cb79d4bcbe3cb8fd0bda40137e2c9415b67f1.tar.gz
bcm5719-llvm-093cb79d4bcbe3cb8fd0bda40137e2c9415b67f1.zip
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). llvm-svn: 109028
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 221b994db55..06229d78e2e 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud