mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -543,7 +543,7 @@ bool LLParser::ParseNamedMetadata() {
|
||||
ParseToken(lltok::lbrace, "Expected '{' here"))
|
||||
return true;
|
||||
|
||||
SmallVector<MDNode *, 8> Elts;
|
||||
NamedMDNode *NMD = M->getOrInsertNamedMetadata(Name);
|
||||
if (Lex.getKind() != lltok::rbrace)
|
||||
do {
|
||||
if (ParseToken(lltok::exclaim, "Expected '!' here"))
|
||||
@@ -551,13 +551,12 @@ bool LLParser::ParseNamedMetadata() {
|
||||
|
||||
MDNode *N = 0;
|
||||
if (ParseMDNodeID(N)) return true;
|
||||
Elts.push_back(N);
|
||||
NMD->addOperand(N);
|
||||
} while (EatIfPresent(lltok::comma));
|
||||
|
||||
if (ParseToken(lltok::rbrace, "expected end of metadata node"))
|
||||
return true;
|
||||
|
||||
NamedMDNode::Create(Context, Name, Elts.data(), Elts.size(), M);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user