mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
clean up this code, add a fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -789,18 +789,18 @@ bool BitcodeReader::ParseMetadata() {
|
|||||||
unsigned Size = Record.size();
|
unsigned Size = Record.size();
|
||||||
SmallVector<MDNode *, 8> Elts;
|
SmallVector<MDNode *, 8> Elts;
|
||||||
for (unsigned i = 0; i != Size; ++i) {
|
for (unsigned i = 0; i != Size; ++i) {
|
||||||
if (Record[i] == ~0U)
|
if (Record[i] == ~0U) {
|
||||||
Elts.push_back(NULL);
|
Elts.push_back(NULL);
|
||||||
else {
|
continue;
|
||||||
Value *MD = MDValueList.getValueFwdRef(Record[i]);
|
|
||||||
if (MDNode *B = dyn_cast<MDNode>(MD))
|
|
||||||
Elts.push_back(B);
|
|
||||||
else
|
|
||||||
return Error("Malformed metadata record");
|
|
||||||
}
|
}
|
||||||
|
MDNode *MD = dyn_cast<MDNode>(MDValueList.getValueFwdRef(Record[i]));
|
||||||
|
if (MD == 0)
|
||||||
|
return Error("Malformed metadata record");
|
||||||
|
Elts.push_back(MD);
|
||||||
}
|
}
|
||||||
Value *V = NamedMDNode::Create(Context, Name.str(), Elts.data(),
|
Value *V = NamedMDNode::Create(Context, Name.str(), Elts.data(),
|
||||||
Elts.size(), TheModule);
|
Elts.size(), TheModule);
|
||||||
|
// FIXME: This shouldn't poke NextValueNo?
|
||||||
MDValueList.AssignValue(V, NextValueNo++);
|
MDValueList.AssignValue(V, NextValueNo++);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user