[BPF] generate btf_decl_tag records for params of extern functions
authorEduard Zingerman <eddyz87@gmail.com>
Sat, 7 Jan 2023 17:29:02 +0000 (09:29 -0800)
committerYonghong Song <yhs@fb.com>
Sat, 7 Jan 2023 17:32:18 +0000 (09:32 -0800)
commitf60aefdc7ff16aa2d4ab24e25a0c0fbbb10d8ea6
treedab0c0453384cd6e4bd775ce45a899bd6b00162e
parent6dc85bd3fde7df2999fda07e9e9f2e83d52c6125
[BPF] generate btf_decl_tag records for params of extern functions

After frontend changes in the following commit:
"BPF: preserve btf_decl_tag for parameters of extern functions"
same mechanics could be used to get the list of function parameters
and associated btf_decl_tag entries for both extern and non-extern
functions.

This commit extracts this mechanics as a separate auxiliary function
BTFDebug::processDISubprogram(). The function is called for both
extern and non-extern functions in order to generated corresponding
BTF_DECL_TAG records.

Differential Revision: https://reviews.llvm.org/D140971
llvm/lib/Target/BPF/BTFDebug.cpp
llvm/lib/Target/BPF/BTFDebug.h
llvm/test/CodeGen/BPF/BTF/tag-extern-func.ll [new file with mode: 0644]