[Assignment Tracking][3/*] Add DIAssignID metadata boilerplate
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir Add the DIAssignID metadata attachment boilerplate. Includes a textual-bitcode roundtrip test and tests that the verifier and parser catch badly formed IR. This piece of metadata links together stores (used as an attachment) and the yet-to-be-added llvm.dbg.assign debug intrinsic (used as an operand). Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D132222
This commit is contained in:
@@ -340,6 +340,8 @@ private:
|
||||
unsigned Abbrev);
|
||||
void writeDIModule(const DIModule *N, SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev);
|
||||
void writeDIAssignID(const DIAssignID *N, SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev);
|
||||
void writeDITemplateTypeParameter(const DITemplateTypeParameter *N,
|
||||
SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev);
|
||||
@@ -1949,6 +1951,15 @@ void ModuleBitcodeWriter::writeDIModule(const DIModule *N,
|
||||
Record.clear();
|
||||
}
|
||||
|
||||
void ModuleBitcodeWriter::writeDIAssignID(const DIAssignID *N,
|
||||
SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev) {
|
||||
// There are no arguments for this metadata type.
|
||||
Record.push_back(N->isDistinct());
|
||||
Stream.EmitRecord(bitc::METADATA_ASSIGN_ID, Record, Abbrev);
|
||||
Record.clear();
|
||||
}
|
||||
|
||||
void ModuleBitcodeWriter::writeDITemplateTypeParameter(
|
||||
const DITemplateTypeParameter *N, SmallVectorImpl<uint64_t> &Record,
|
||||
unsigned Abbrev) {
|
||||
|
||||
Reference in New Issue
Block a user