[llvm] [BPF] Strip map struct names (PR #164851)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 23 10:09:20 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/lib/Target/BPF/BTFDebug.cpp llvm/lib/Target/BPF/BTFDebug.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/BPF/BTFDebug.cpp b/llvm/lib/Target/BPF/BTFDebug.cpp
index 7718e36f1..43ea28b1c 100644
--- a/llvm/lib/Target/BPF/BTFDebug.cpp
+++ b/llvm/lib/Target/BPF/BTFDebug.cpp
@@ -757,9 +757,8 @@ void BTFDebug::visitStructType(const DICompositeType *CTy, bool IsStruct,
     }
   }
 
-  auto TypeEntry =
-      std::make_unique<BTFTypeStruct>(CTy, IsStruct, HasBitField, VLen,
-                                      StripName);
+  auto TypeEntry = std::make_unique<BTFTypeStruct>(CTy, IsStruct, HasBitField,
+                                                   VLen, StripName);
   StructTypes.push_back(TypeEntry.get());
   TypeId = addType(std::move(TypeEntry), CTy);
 
@@ -864,8 +863,8 @@ void BTFDebug::visitFwdDeclType(const DICompositeType *CTy, bool IsUnion,
 }
 
 /// Handle structure, union, array and enumeration types.
-void BTFDebug::visitCompositeType(const DICompositeType *CTy,
-                                  uint32_t &TypeId, bool StripName) {
+void BTFDebug::visitCompositeType(const DICompositeType *CTy, uint32_t &TypeId,
+                                  bool StripName) {
   auto Tag = CTy->getTag();
   switch (Tag) {
   case dwarf::DW_TAG_structure_type:
@@ -875,7 +874,8 @@ void BTFDebug::visitCompositeType(const DICompositeType *CTy,
     if (CTy->isForwardDecl())
       visitFwdDeclType(CTy, Tag == dwarf::DW_TAG_union_type, TypeId);
     else
-      visitStructType(CTy, Tag == dwarf::DW_TAG_structure_type, TypeId, StripName);
+      visitStructType(CTy, Tag == dwarf::DW_TAG_structure_type, TypeId,
+                      StripName);
     break;
   case dwarf::DW_TAG_array_type:
     visitArrayType(CTy, TypeId);
@@ -905,8 +905,8 @@ void BTFDebug::visitDerivedType(const DIDerivedType *DTy, uint32_t &TypeId,
   unsigned Tag = DTy->getTag();
 
   if (Tag == dwarf::DW_TAG_atomic_type)
-    return visitTypeEntry(DTy->getBaseType(), TypeId, CheckPointer,
-                          SeenPointer, false);
+    return visitTypeEntry(DTy->getBaseType(), TypeId, CheckPointer, SeenPointer,
+                          false);
 
   /// Try to avoid chasing pointees, esp. structure pointees which may
   /// unnecessary bring in a lot of types.

``````````

</details>


https://github.com/llvm/llvm-project/pull/164851


More information about the llvm-commits mailing list