[PATCH] D103549: [POC] Put annotation strings into debuginfo.
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 2 16:29:59 PDT 2021
dblaikie added a comment.
In D103549#2794462 <https://reviews.llvm.org/D103549#2794462>, @yonghong-song wrote:
>> As for supporting it in DWARF, probably with a custom attribute (DW_AT_BTF_annotation? (or "LLVM" instead of "BTF" perhaps, I'm not sure)) with a standard form (DW_FORM_strp/strxN/etc - the usual way we emit strings).
>
> This is a good idea. Could you give some pointers where I could add one custom attribute? Does llvm currently have any custom attribute?
Yep LLVM does have some custom attributes and such, eg: https://github.com/llvm/llvm-project/blob/effb87dfa810a28e763f914fe3e6e984782cc846/llvm/include/llvm/BinaryFormat/Dwarf.def#L592
Used here: https://github.com/llvm/llvm-project/blob/effb87dfa810a28e763f914fe3e6e984782cc846/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp#L1083
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103549/new/
https://reviews.llvm.org/D103549
More information about the cfe-commits
mailing list