summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-24 14:35:45 +0000
committerDan Gohman <gohman@apple.com>2010-08-24 14:35:45 +0000
commitf0715b179a3e39f95d02a7d50170f819bd1c99f5 (patch)
treeb768204c5f7346a6e726056f9fb211a31308b9b6 /llvm/lib/AsmParser
parent7c7f13a5e64258f6ec704d61c090ffcec14e3736 (diff)
downloadbcm5719-llvm-f0715b179a3e39f95d02a7d50170f819bd1c99f5.tar.gz
bcm5719-llvm-f0715b179a3e39f95d02a7d50170f819bd1c99f5.zip
Add a comment explaining why this code doesn't just call
ParseMetadataValue. llvm-svn: 111914
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 0eb1b70c3f2..7766ad61da1 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -1134,6 +1134,10 @@ bool LLParser::ParseInstructionMetadata(Instruction *Inst,
if (ParseToken(lltok::exclaim, "expected '!' here"))
return true;
+ // This code is similar to that of ParseMetadataValue, however it needs to
+ // have special-case code for a forward reference; see the comments on
+ // ForwardRefInstMetadata for details. Also, MDStrings are not supported
+ // at the top level here.
if (Lex.getKind() == lltok::lbrace) {
ValID ID;
if (ParseMetadataListValue(ID, PFS))
OpenPOWER on IntegriCloud