mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 12:50:00 +00:00
Remove some "2" suffixes from the metadata enums now that "1" is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133269 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
020a5a449f
commit
9d61dd9a08
@ -118,10 +118,10 @@ namespace bitc {
|
|||||||
// 5 is unused.
|
// 5 is unused.
|
||||||
METADATA_KIND = 6, // [n x [id, name]]
|
METADATA_KIND = 6, // [n x [id, name]]
|
||||||
// 7 is unused.
|
// 7 is unused.
|
||||||
METADATA_NODE2 = 8, // NODE2: [n x (type num, value num)]
|
METADATA_NODE = 8, // NODE: [n x (type num, value num)]
|
||||||
METADATA_FN_NODE2 = 9, // FN_NODE2: [n x (type num, value num)]
|
METADATA_FN_NODE = 9, // FN_NODE: [n x (type num, value num)]
|
||||||
METADATA_NAMED_NODE2 = 10, // NAMED_NODE2: [n x mdnodes]
|
METADATA_NAMED_NODE = 10, // NAMED_NODE: [n x mdnodes]
|
||||||
METADATA_ATTACHMENT2 = 11 // [m x [value, [n x [id, mdnode]]]
|
METADATA_ATTACHMENT = 11 // [m x [value, [n x [id, mdnode]]]
|
||||||
};
|
};
|
||||||
// The constants block (CONSTANTS_BLOCK_ID) describes emission for each
|
// The constants block (CONSTANTS_BLOCK_ID) describes emission for each
|
||||||
// constant and maintains an implicit current type value.
|
// constant and maintains an implicit current type value.
|
||||||
|
@ -790,9 +790,9 @@ bool BitcodeReader::ParseMetadata() {
|
|||||||
Record.clear();
|
Record.clear();
|
||||||
Code = Stream.ReadCode();
|
Code = Stream.ReadCode();
|
||||||
|
|
||||||
// METADATA_NAME is always followed by METADATA_NAMED_NODE2.
|
// METADATA_NAME is always followed by METADATA_NAMED_NODE.
|
||||||
unsigned NextBitCode = Stream.ReadRecord(Code, Record);
|
unsigned NextBitCode = Stream.ReadRecord(Code, Record);
|
||||||
assert(NextBitCode == bitc::METADATA_NAMED_NODE2); (void)NextBitCode;
|
assert(NextBitCode == bitc::METADATA_NAMED_NODE); (void)NextBitCode;
|
||||||
|
|
||||||
// Read named metadata elements.
|
// Read named metadata elements.
|
||||||
unsigned Size = Record.size();
|
unsigned Size = Record.size();
|
||||||
@ -805,18 +805,18 @@ bool BitcodeReader::ParseMetadata() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case bitc::METADATA_FN_NODE2:
|
case bitc::METADATA_FN_NODE:
|
||||||
IsFunctionLocal = true;
|
IsFunctionLocal = true;
|
||||||
// fall-through
|
// fall-through
|
||||||
case bitc::METADATA_NODE2: {
|
case bitc::METADATA_NODE: {
|
||||||
if (Record.size() % 2 == 1)
|
if (Record.size() % 2 == 1)
|
||||||
return Error("Invalid METADATA_NODE2 record");
|
return Error("Invalid METADATA_NODE record");
|
||||||
|
|
||||||
unsigned Size = Record.size();
|
unsigned Size = Record.size();
|
||||||
SmallVector<Value*, 8> Elts;
|
SmallVector<Value*, 8> Elts;
|
||||||
for (unsigned i = 0; i != Size; i += 2) {
|
for (unsigned i = 0; i != Size; i += 2) {
|
||||||
const Type *Ty = getTypeByID(Record[i]);
|
const Type *Ty = getTypeByID(Record[i]);
|
||||||
if (!Ty) return Error("Invalid METADATA_NODE2 record");
|
if (!Ty) return Error("Invalid METADATA_NODE record");
|
||||||
if (Ty->isMetadataTy())
|
if (Ty->isMetadataTy())
|
||||||
Elts.push_back(MDValueList.getValueFwdRef(Record[i+1]));
|
Elts.push_back(MDValueList.getValueFwdRef(Record[i+1]));
|
||||||
else if (!Ty->isVoidTy())
|
else if (!Ty->isVoidTy())
|
||||||
@ -1736,7 +1736,7 @@ bool BitcodeReader::ParseMetadataAttachment() {
|
|||||||
switch (Stream.ReadRecord(Code, Record)) {
|
switch (Stream.ReadRecord(Code, Record)) {
|
||||||
default: // Default behavior: ignore.
|
default: // Default behavior: ignore.
|
||||||
break;
|
break;
|
||||||
case bitc::METADATA_ATTACHMENT2: {
|
case bitc::METADATA_ATTACHMENT: {
|
||||||
unsigned RecordLength = Record.size();
|
unsigned RecordLength = Record.size();
|
||||||
if (Record.empty() || (RecordLength - 1) % 2 == 1)
|
if (Record.empty() || (RecordLength - 1) % 2 == 1)
|
||||||
return Error ("Invalid METADATA_ATTACHMENT reader!");
|
return Error ("Invalid METADATA_ATTACHMENT reader!");
|
||||||
|
@ -262,7 +262,7 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
|
|||||||
case bitc::METADATA_ATTACHMENT_ID:
|
case bitc::METADATA_ATTACHMENT_ID:
|
||||||
switch(CodeID) {
|
switch(CodeID) {
|
||||||
default:return 0;
|
default:return 0;
|
||||||
case bitc::METADATA_ATTACHMENT2: return "METADATA_ATTACHMENT2";
|
case bitc::METADATA_ATTACHMENT: return "METADATA_ATTACHMENT";
|
||||||
}
|
}
|
||||||
case bitc::METADATA_BLOCK_ID:
|
case bitc::METADATA_BLOCK_ID:
|
||||||
switch(CodeID) {
|
switch(CodeID) {
|
||||||
@ -270,9 +270,9 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
|
|||||||
case bitc::METADATA_STRING: return "METADATA_STRING";
|
case bitc::METADATA_STRING: return "METADATA_STRING";
|
||||||
case bitc::METADATA_NAME: return "METADATA_NAME";
|
case bitc::METADATA_NAME: return "METADATA_NAME";
|
||||||
case bitc::METADATA_KIND: return "METADATA_KIND";
|
case bitc::METADATA_KIND: return "METADATA_KIND";
|
||||||
case bitc::METADATA_NODE2: return "METADATA_NODE2";
|
case bitc::METADATA_NODE: return "METADATA_NODE";
|
||||||
case bitc::METADATA_FN_NODE2: return "METADATA_FN_NODE2";
|
case bitc::METADATA_FN_NODE: return "METADATA_FN_NODE";
|
||||||
case bitc::METADATA_NAMED_NODE2: return "METADATA_NAMED_NODE2";
|
case bitc::METADATA_NAMED_NODE: return "METADATA_NAMED_NODE";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user