This is an archive of the discontinued LLVM Phabricator instance.

[BPF] generate btf_decl_tag records for params of extern functions
ClosedPublic

Authored by eddyz87 on Jan 4 2023, 5:02 AM.

Details

Summary

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.

Depends on D140970

Diff Detail

Event Timeline

eddyz87 created this revision.Jan 4 2023, 5:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 5:02 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
eddyz87 abandoned this revision.Jan 4 2023, 5:08 AM
This comment was removed by eddyz87.
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 5:08 AM
eddyz87 reclaimed this revision.Jan 4 2023, 5:11 AM
eddyz87 published this revision for review.Jan 4 2023, 5:15 AM
eddyz87 added a reviewer: yonghong-song.
eddyz87 updated this revision to Diff 486328.Jan 4 2023, 10:00 AM

Replace test case DIFile name and checksum with fake values to avoid
potential missmatches in strings produced by BTFDebug::constructLineInfo().

eddyz87 updated this revision to Diff 487009.Jan 6 2023, 4:07 PM

Fix for clang-format issue reported by CI.

yonghong-song accepted this revision.Jan 7 2023, 9:27 AM
This revision is now accepted and ready to land.Jan 7 2023, 9:27 AM