[PATCH] D140929: [BPF] Support for "btf_decl_tag" annotations for arguments of extern functions

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 23:52:01 PST 2023


yonghong-song added inline comments.


================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4218
+  // DISubprogram's retainedNodes in the subsequent finalizeSubprogram call.
+  if (IsDeclForCallSite && CGM.getTarget().getTriple().isBPF()) {
+    if (auto *FD = dyn_cast<FunctionDecl>(D)) {
----------------
yonghong-song wrote:
> Looks like this is for bpf only? Can we extend it to non-bpf as well? Currently, I think most use case, if any, will be in vmlinux (e.g., for struct_ops callback, etc).
sorry, the above comment is not right about struct_ops, I thought this is for function pointer parameters, but it is for extern functions. Yes, for vmlinux, we don't need to support extern func arg decl tags since we always have real function definitions. So bpf only support is okay.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140929/new/

https://reviews.llvm.org/D140929



More information about the llvm-commits mailing list