[DebugInfo] generate btf_tag annotations for DISubprogram types
Generate btf_tag annotations for DISubprogram types.
A field "annotations" is introduced to DISubprogram, and
annotations are represented as an DINodeArray, similar to
DIComposite elements. The following example illustrates how
annotations are encoded in IR:
distinct !DISubprogram(..., annotations: !10)
!10 = !{!11, !12}
!11 = !{!"btf_tag", !"a"}
!12 = !{!"btf_tag", !"b"}
Differential Revision: https://reviews.llvm.org/D106618
This commit is contained in:
@@ -1814,6 +1814,7 @@ void ModuleBitcodeWriter::writeDISubprogram(const DISubprogram *N,
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getRetainedNodes().get()));
|
||||
Record.push_back(N->getThisAdjustment());
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getThrownTypes().get()));
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getAnnotations().get()));
|
||||
|
||||
Stream.EmitRecord(bitc::METADATA_SUBPROGRAM, Record, Abbrev);
|
||||
Record.clear();
|
||||
|
||||
Reference in New Issue
Block a user