mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-31 10:30:08 +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:
@@ -801,16 +801,13 @@ bool BitcodeReader::ParseMetadata() {
|
||||
|
||||
// Read named metadata elements.
|
||||
unsigned Size = Record.size();
|
||||
SmallVector<MDNode *, 8> Elts;
|
||||
NamedMDNode *NMD = TheModule->getOrInsertNamedMetadata(Name);
|
||||
for (unsigned i = 0; i != Size; ++i) {
|
||||
MDNode *MD = dyn_cast<MDNode>(MDValueList.getValueFwdRef(Record[i]));
|
||||
if (MD == 0)
|
||||
return Error("Malformed metadata record");
|
||||
Elts.push_back(MD);
|
||||
NMD->addOperand(MD);
|
||||
}
|
||||
Value *V = NamedMDNode::Create(Context, Name.str(), Elts.data(),
|
||||
Elts.size(), TheModule);
|
||||
MDValueList.AssignValue(V, NextMDValueNo++);
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_FN_NODE:
|
||||
|
Reference in New Issue
Block a user