mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 07:37:34 +00:00
NamedMDNode element is either null or MDNode. Otherwise this is a malformed NamedMDNode record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8fba578be7
commit
7f9664699e
@ -793,8 +793,10 @@ bool BitcodeReader::ParseMetadata() {
|
||||
Elts.push_back(NULL);
|
||||
else {
|
||||
Value *MD = MDValueList.getValueFwdRef(Record[i]);
|
||||
if (MDNode *B = dyn_cast_or_null<MDNode>(MD))
|
||||
if (MDNode *B = dyn_cast<MDNode>(MD))
|
||||
Elts.push_back(B);
|
||||
else
|
||||
return Error("Malformed metadata record");
|
||||
}
|
||||
}
|
||||
Value *V = NamedMDNode::Create(Context, Name.str(), Elts.data(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user