mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Add support for empty metadata nodes: !{}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -820,7 +820,7 @@ bool BitcodeReader::ParseMetadata() {
|
||||
IsFunctionLocal = true;
|
||||
// fall-through
|
||||
case bitc::METADATA_NODE: {
|
||||
if (Record.empty() || Record.size() % 2 == 1)
|
||||
if (Record.size() % 2 == 1)
|
||||
return Error("Invalid METADATA_NODE record");
|
||||
|
||||
unsigned Size = Record.size();
|
||||
@ -834,7 +834,8 @@ bool BitcodeReader::ParseMetadata() {
|
||||
else
|
||||
Elts.push_back(NULL);
|
||||
}
|
||||
Value *V = MDNode::getWhenValsUnresolved(Context, &Elts[0], Elts.size(),
|
||||
Value *V = MDNode::getWhenValsUnresolved(Context,
|
||||
Elts.data(), Elts.size(),
|
||||
IsFunctionLocal);
|
||||
IsFunctionLocal = false;
|
||||
MDValueList.AssignValue(V, NextMDValueNo++);
|
||||
|
Reference in New Issue
Block a user