[DebugInfo] generate btf_tag annotations for func parameters
Generate btf_tag annotations for function parameters.
A field "annotations" is introduced to DILocalVariable, and
annotations are represented as an DINodeArray, similar to
DIComposite elements. The following example illustrates how
annotations are encoded in IR:
distinct !DILocalVariable(name: "info",, arg: 1, ..., annotations: !10)
!10 = !{!11, !12}
!11 = !{!"btf_tag", !"a"}
!12 = !{!"btf_tag", !"b"}
Differential Revision: https://reviews.llvm.org/D106620
This commit is contained in:
@@ -1994,6 +1994,7 @@ void ModuleBitcodeWriter::writeDILocalVariable(
|
||||
Record.push_back(N->getArg());
|
||||
Record.push_back(N->getFlags());
|
||||
Record.push_back(N->getAlignInBits());
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getAnnotations().get()));
|
||||
|
||||
Stream.EmitRecord(bitc::METADATA_LOCAL_VAR, Record, Abbrev);
|
||||
Record.clear();
|
||||
|
||||
Reference in New Issue
Block a user