rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as you'd expect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-12-30 04:15:23 +00:00
parent 860775c2b0
commit 4a72efc0ad
2 changed files with 6 additions and 6 deletions

View File

@ -472,7 +472,7 @@ bool LLParser::ParseMDString(MDString *&Result) {
// MDNode: // MDNode:
// ::= '!' MDNodeNumber // ::= '!' MDNodeNumber
bool LLParser::ParseMDNode(MDNode *&Result) { bool LLParser::ParseMDNodeID(MDNode *&Result) {
// !{ ..., !42, ... } // !{ ..., !42, ... }
unsigned MID = 0; unsigned MID = 0;
if (ParseUInt32(MID)) return true; if (ParseUInt32(MID)) return true;
@ -522,7 +522,7 @@ bool LLParser::ParseNamedMetadata() {
// FIXME: This rejects MDStrings. Are they legal in an named MDNode or not? // FIXME: This rejects MDStrings. Are they legal in an named MDNode or not?
MDNode *N = 0; MDNode *N = 0;
if (ParseMDNode(N)) return true; if (ParseMDNodeID(N)) return true;
Elts.push_back(N); Elts.push_back(N);
} while (EatIfPresent(lltok::comma)); } while (EatIfPresent(lltok::comma));
@ -1077,7 +1077,7 @@ bool LLParser::ParseOptionalCustomMetadata() {
Lex.Lex(); Lex.Lex();
MDNode *Node; MDNode *Node;
if (ParseMDNode(Node)) return true; if (ParseMDNodeID(Node)) return true;
unsigned MDK = M->getMDKindID(Name.c_str()); unsigned MDK = M->getMDKindID(Name.c_str());
MDsOnInst.push_back(std::make_pair(MDK, Node)); MDsOnInst.push_back(std::make_pair(MDK, Node));
@ -1906,7 +1906,7 @@ bool LLParser::ParseValID(ValID &ID) {
// Standalone metadata reference // Standalone metadata reference
// !{ ..., !42, ... } // !{ ..., !42, ... }
if (Lex.getKind() == lltok::APSInt) { if (Lex.getKind() == lltok::APSInt) {
if (ParseMDNode(ID.MDNodeVal)) return true; if (ParseMDNodeID(ID.MDNodeVal)) return true;
ID.Kind = ValID::t_MDNode; ID.Kind = ValID::t_MDNode;
return false; return false;
} }
@ -3810,7 +3810,7 @@ bool LLParser::ParseMDNodeVector(SmallVectorImpl<Value*> &Elts) {
if (Lex.getKind() == lltok::Metadata) { if (Lex.getKind() == lltok::Metadata) {
Lex.Lex(); Lex.Lex();
MDNode *Node = 0; MDNode *Node = 0;
if (!ParseMDNode(Node)) if (!ParseMDNodeID(Node))
V = Node; V = Node;
else { else {
MDString *MDS = 0; MDString *MDS = 0;

View File

@ -196,7 +196,7 @@ namespace llvm {
bool ParseStandaloneMetadata(); bool ParseStandaloneMetadata();
bool ParseNamedMetadata(); bool ParseNamedMetadata();
bool ParseMDString(MDString *&Result); bool ParseMDString(MDString *&Result);
bool ParseMDNode(MDNode *&Result); bool ParseMDNodeID(MDNode *&Result);
// Type Parsing. // Type Parsing.
bool ParseType(PATypeHolder &Result, bool AllowVoid = false); bool ParseType(PATypeHolder &Result, bool AllowVoid = false);