Add a comment explaining why this code doesn't just call
authorDan Gohman <gohman@apple.com>
Tue, 24 Aug 2010 14:35:45 +0000 (14:35 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 24 Aug 2010 14:35:45 +0000 (14:35 +0000)
ParseMetadataValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111914 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLParser.cpp

index 0eb1b70c3f20e5d505153b2d13ed9f12daf91105..7766ad61da110a7e58ca2c5e8ef4b3b14ad36ac1 100644 (file)
@@ -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))