[all-commits] [llvm/llvm-project] 58bdf8: [BPF] preserve btf_decl_tag for parameters of exte...

eddyz87 via All-commits all-commits at lists.llvm.org
Fri Jan 6 23:03:02 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58bdf8f9a8c3331c6c4d5f631395fb6f786d1e9c
      https://github.com/llvm/llvm-project/commit/58bdf8f9a8c3331c6c4d5f631395fb6f786d1e9c
  Author: Eduard Zingerman <eddyz87 at gmail.com>
  Date:   2023-01-06 (Fri, 06 Jan 2023)

  Changed paths:
    M clang/lib/CodeGen/CGDebugInfo.cpp
    A clang/test/CodeGen/bpf-decl-tag-extern-func-args.c

  Log Message:
  -----------
  [BPF] preserve btf_decl_tag for parameters of extern functions

Generate DILocalVariable entries for parameters of extern functions,
the "annotations" field of DILocalVariable is used to link
"btf_decl_tag" annotation with the parameter.

Do this only for BPF backend as there are no other users for this
information. Final DWARF is valid as "Appendix A" is very much lax in
what is allowed as attributes for "DW_TAG_formal_parameter":

    DWARF does not in general require that a given debugging information
    entry contain a particular attribute or set of attributes. Instead,
    a DWARF producer is free to generate any, all, or none of the
    attributes ... other attributes ... may also appear in a given
    debugging information entry.

DWARF Debugging Information Format Version 5,
Appendix A: Attributes by Tag Value (Informative)
Page 251, Line 3.

Differential Revision: https://reviews.llvm.org/D140970




More information about the All-commits mailing list