mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
AsmWriter/Bitcode: MDSubrange
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229003 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1173,6 +1173,8 @@ std::error_code BitcodeReader::ParseValueSymbolTable() {
|
||||
}
|
||||
}
|
||||
|
||||
static int64_t unrotateSign(uint64_t U) { return U & 1 ? ~(U >> 1) : U >> 1; }
|
||||
|
||||
std::error_code BitcodeReader::ParseMetadata() {
|
||||
unsigned NextMDValueNo = MDValueList.size();
|
||||
|
||||
@ -1349,6 +1351,16 @@ std::error_code BitcodeReader::ParseMetadata() {
|
||||
NextMDValueNo++);
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_SUBRANGE: {
|
||||
if (Record.size() != 3)
|
||||
return Error("Invalid record");
|
||||
|
||||
MDValueList.AssignValue(
|
||||
GET_OR_DISTINCT(MDSubrange, Record[0],
|
||||
(Context, Record[1], unrotateSign(Record[2]))),
|
||||
NextMDValueNo++);
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_STRING: {
|
||||
std::string String(Record.begin(), Record.end());
|
||||
llvm::UpgradeMDStringConstant(String);
|
||||
|
Reference in New Issue
Block a user