[llvm-commits] [llvm] r92291 - in /llvm/trunk/lib/AsmParser: LLParser.cpp LLParser.h
Chris Lattner
sabre at nondot.org
Tue Dec 29 20:15:24 PST 2009
Author: lattner
Date: Tue Dec 29 22:15:23 2009
New Revision: 92291
URL: http://llvm.org/viewvc/llvm-project?rev=92291&view=rev
Log:
rename ParseMDNode -> ParseMDNodeID, since it parses !42, not !{... } as you'd expect.
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
llvm/trunk/lib/AsmParser/LLParser.h
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=92291&r1=92290&r2=92291&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Tue Dec 29 22:15:23 2009
@@ -472,7 +472,7 @@
// MDNode:
// ::= '!' MDNodeNumber
-bool LLParser::ParseMDNode(MDNode *&Result) {
+bool LLParser::ParseMDNodeID(MDNode *&Result) {
// !{ ..., !42, ... }
unsigned MID = 0;
if (ParseUInt32(MID)) return true;
@@ -522,7 +522,7 @@
// FIXME: This rejects MDStrings. Are they legal in an named MDNode or not?
MDNode *N = 0;
- if (ParseMDNode(N)) return true;
+ if (ParseMDNodeID(N)) return true;
Elts.push_back(N);
} while (EatIfPresent(lltok::comma));
@@ -1077,7 +1077,7 @@
Lex.Lex();
MDNode *Node;
- if (ParseMDNode(Node)) return true;
+ if (ParseMDNodeID(Node)) return true;
unsigned MDK = M->getMDKindID(Name.c_str());
MDsOnInst.push_back(std::make_pair(MDK, Node));
@@ -1906,7 +1906,7 @@
// Standalone metadata reference
// !{ ..., !42, ... }
if (Lex.getKind() == lltok::APSInt) {
- if (ParseMDNode(ID.MDNodeVal)) return true;
+ if (ParseMDNodeID(ID.MDNodeVal)) return true;
ID.Kind = ValID::t_MDNode;
return false;
}
@@ -3810,7 +3810,7 @@
if (Lex.getKind() == lltok::Metadata) {
Lex.Lex();
MDNode *Node = 0;
- if (!ParseMDNode(Node))
+ if (!ParseMDNodeID(Node))
V = Node;
else {
MDString *MDS = 0;
Modified: llvm/trunk/lib/AsmParser/LLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.h?rev=92291&r1=92290&r2=92291&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.h (original)
+++ llvm/trunk/lib/AsmParser/LLParser.h Tue Dec 29 22:15:23 2009
@@ -196,7 +196,7 @@
bool ParseStandaloneMetadata();
bool ParseNamedMetadata();
bool ParseMDString(MDString *&Result);
- bool ParseMDNode(MDNode *&Result);
+ bool ParseMDNodeID(MDNode *&Result);
// Type Parsing.
bool ParseType(PATypeHolder &Result, bool AllowVoid = false);
More information about the llvm-commits
mailing list