[PATCH] D106616: [Clang][LLVM] generate btf_tag annotations for DIDerived types
    David Blaikie via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Fri Aug 20 10:36:09 PDT 2021
    
    
  
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Sounds good. Please do the `hasAttr`/`CollectBTFTagAnnotations` refactor in a separate preliminary commit (cleaning up any existing callers that have the null check like that), then commit this in two parts, llvm first, then clang.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1503-1504
+    llvm::DINodeArray Annotations = nullptr;
+    if (field->hasAttr<BTFTagAttr>())
+      Annotations = CollectBTFTagAnnotations(field);
+
----------------
could the `hasAttr` test be sunk into the `CollectBTFTagAnnotations` function? (so it's not repeated at all the callers)
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106616/new/
https://reviews.llvm.org/D106616
    
    
More information about the cfe-commits
mailing list