mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +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.
|
||||
METADATA_KIND = 6, // [n x [id, name]]
|
||||
// 7 is unused.
|
||||
METADATA_NODE2 = 8, // NODE2: [n x (type num, value num)]
|
||||
METADATA_FN_NODE2 = 9, // FN_NODE2: [n x (type num, value num)]
|
||||
METADATA_NAMED_NODE2 = 10, // NAMED_NODE2: [n x mdnodes]
|
||||
METADATA_ATTACHMENT2 = 11 // [m x [value, [n x [id, mdnode]]]
|
||||
METADATA_NODE = 8, // NODE: [n x (type num, value num)]
|
||||
METADATA_FN_NODE = 9, // FN_NODE: [n x (type num, value num)]
|
||||
METADATA_NAMED_NODE = 10, // NAMED_NODE: [n x mdnodes]
|
||||
METADATA_ATTACHMENT = 11 // [m x [value, [n x [id, mdnode]]]
|
||||
};
|
||||
// The constants block (CONSTANTS_BLOCK_ID) describes emission for each
|
||||
// constant and maintains an implicit current type value.
|
||||
|
@ -790,9 +790,9 @@ bool BitcodeReader::ParseMetadata() {
|
||||
Record.clear();
|
||||
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);
|
||||
assert(NextBitCode == bitc::METADATA_NAMED_NODE2); (void)NextBitCode;
|
||||
assert(NextBitCode == bitc::METADATA_NAMED_NODE); (void)NextBitCode;
|
||||
|
||||
// Read named metadata elements.
|
||||
unsigned Size = Record.size();
|
||||
@ -805,18 +805,18 @@ bool BitcodeReader::ParseMetadata() {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_FN_NODE2:
|
||||
case bitc::METADATA_FN_NODE:
|
||||
IsFunctionLocal = true;
|
||||
// fall-through
|
||||
case bitc::METADATA_NODE2: {
|
||||
case bitc::METADATA_NODE: {
|
||||
if (Record.size() % 2 == 1)
|
||||
return Error("Invalid METADATA_NODE2 record");
|
||||
return Error("Invalid METADATA_NODE record");
|
||||
|
||||
unsigned Size = Record.size();
|
||||
SmallVector<Value*, 8> Elts;
|
||||
for (unsigned i = 0; i != Size; i += 2) {
|
||||
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())
|
||||
Elts.push_back(MDValueList.getValueFwdRef(Record[i+1]));
|
||||
else if (!Ty->isVoidTy())
|
||||
@ -1736,7 +1736,7 @@ bool BitcodeReader::ParseMetadataAttachment() {
|
||||
switch (Stream.ReadRecord(Code, Record)) {
|
||||
default: // Default behavior: ignore.
|
||||
break;
|
||||
case bitc::METADATA_ATTACHMENT2: {
|
||||
case bitc::METADATA_ATTACHMENT: {
|
||||
unsigned RecordLength = Record.size();
|
||||
if (Record.empty() || (RecordLength - 1) % 2 == 1)
|
||||
return Error ("Invalid METADATA_ATTACHMENT reader!");
|
||||
|
@ -262,7 +262,7 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
|
||||
case bitc::METADATA_ATTACHMENT_ID:
|
||||
switch(CodeID) {
|
||||
default:return 0;
|
||||
case bitc::METADATA_ATTACHMENT2: return "METADATA_ATTACHMENT2";
|
||||
case bitc::METADATA_ATTACHMENT: return "METADATA_ATTACHMENT";
|
||||
}
|
||||
case bitc::METADATA_BLOCK_ID:
|
||||
switch(CodeID) {
|
||||
@ -270,9 +270,9 @@ static const char *GetCodeName(unsigned CodeID, unsigned BlockID,
|
||||
case bitc::METADATA_STRING: return "METADATA_STRING";
|
||||
case bitc::METADATA_NAME: return "METADATA_NAME";
|
||||
case bitc::METADATA_KIND: return "METADATA_KIND";
|
||||
case bitc::METADATA_NODE2: return "METADATA_NODE2";
|
||||
case bitc::METADATA_FN_NODE2: return "METADATA_FN_NODE2";
|
||||
case bitc::METADATA_NAMED_NODE2: return "METADATA_NAMED_NODE2";
|
||||
case bitc::METADATA_NODE: return "METADATA_NODE";
|
||||
case bitc::METADATA_FN_NODE: return "METADATA_FN_NODE";
|
||||
case bitc::METADATA_NAMED_NODE: return "METADATA_NAMED_NODE";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user