mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-19 08:35:45 +00:00
AsmWriter/Bitcode: MDLexicalBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229016 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1468,6 +1468,17 @@ std::error_code BitcodeReader::ParseMetadata() {
|
||||
NextMDValueNo++);
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_LEXICAL_BLOCK: {
|
||||
if (Record.size() != 5)
|
||||
return Error("Invalid record");
|
||||
|
||||
MDValueList.AssignValue(
|
||||
GET_OR_DISTINCT(MDLexicalBlock, Record[0],
|
||||
(Context, getMDOrNull(Record[1]),
|
||||
getMDOrNull(Record[2]), Record[3], Record[4])),
|
||||
NextMDValueNo++);
|
||||
break;
|
||||
}
|
||||
case bitc::METADATA_STRING: {
|
||||
std::string String(Record.begin(), Record.end());
|
||||
llvm::UpgradeMDStringConstant(String);
|
||||
|
||||
@@ -978,11 +978,21 @@ static void WriteMDSubprogram(const MDSubprogram *N,
|
||||
Record.clear();
|
||||
}
|
||||
|
||||
static void WriteMDLexicalBlock(const MDLexicalBlock *, const ValueEnumerator &,
|
||||
BitstreamWriter &, SmallVectorImpl<uint64_t> &,
|
||||
unsigned) {
|
||||
llvm_unreachable("write not implemented");
|
||||
static void WriteMDLexicalBlock(const MDLexicalBlock *N,
|
||||
const ValueEnumerator &VE,
|
||||
BitstreamWriter &Stream,
|
||||
SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev) {
|
||||
Record.push_back(N->isDistinct());
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getScope()));
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getFile()));
|
||||
Record.push_back(N->getLine());
|
||||
Record.push_back(N->getColumn());
|
||||
|
||||
Stream.EmitRecord(bitc::METADATA_LEXICAL_BLOCK, Record, Abbrev);
|
||||
Record.clear();
|
||||
}
|
||||
|
||||
static void WriteMDLexicalBlockFile(const MDLexicalBlockFile *,
|
||||
const ValueEnumerator &, BitstreamWriter &,
|
||||
SmallVectorImpl<uint64_t> &, unsigned) {
|
||||
|
||||
Reference in New Issue
Block a user