mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
AsmWriter/Bitcode: MDSubroutineType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229011 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1417,6 +1417,16 @@ std::error_code BitcodeReader::ParseMetadata() {
|
||||
NextMDValueNo++);
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_SUBROUTINE_TYPE: {
|
||||
if (Record.size() != 3)
|
||||
return Error("Invalid record");
|
||||
|
||||
MDValueList.AssignValue(
|
||||
GET_OR_DISTINCT(MDSubroutineType, Record[0],
|
||||
(Context, Record[1], getMDOrNull(Record[2]))),
|
||||
NextMDValueNo++);
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_FILE: {
|
||||
if (Record.size() != 3)
|
||||
return Error("Invalid record");
|
||||
|
||||
@@ -901,10 +901,17 @@ static void WriteMDCompositeType(const MDCompositeType *N,
|
||||
Record.clear();
|
||||
}
|
||||
|
||||
static void WriteMDSubroutineType(const MDSubroutineType *,
|
||||
const ValueEnumerator &, BitstreamWriter &,
|
||||
SmallVectorImpl<uint64_t> &, unsigned) {
|
||||
llvm_unreachable("write not implemented");
|
||||
static void WriteMDSubroutineType(const MDSubroutineType *N,
|
||||
const ValueEnumerator &VE,
|
||||
BitstreamWriter &Stream,
|
||||
SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev) {
|
||||
Record.push_back(N->isDistinct());
|
||||
Record.push_back(N->getFlags());
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getTypeArray()));
|
||||
|
||||
Stream.EmitRecord(bitc::METADATA_SUBROUTINE_TYPE, Record, Abbrev);
|
||||
Record.clear();
|
||||
}
|
||||
|
||||
static void WriteMDFile(const MDFile *N, const ValueEnumerator &VE,
|
||||
|
||||
Reference in New Issue
Block a user