[clang] [llvm] [DebugInfo][BPF] Add 'btf:type_tag' annotation in DWARF (PR #91423)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 19:55:52 PDT 2024


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 f34d30cdae0f59698f660d5cc8fb993fb3441064 f75fc64d230ae73370b4f198ed471fe817bdd04c -- clang/test/CodeGen/attr-btf_type_tag-circular.c clang/test/CodeGen/attr-btf_type_tag-const.c clang/test/CodeGen/attr-btf_type_tag-restrict.c clang/test/CodeGen/attr-btf_type_tag-void.c clang/test/CodeGen/attr-btf_type_tag-volatile.c clang/lib/CodeGen/CGDebugInfo.cpp clang/lib/CodeGen/CGDebugInfo.h clang/test/CodeGen/attr-btf_type_tag-func-ptr.c clang/test/CodeGen/attr-btf_type_tag-func.c clang/test/CodeGen/attr-btf_type_tag-similar-type.c clang/test/CodeGen/attr-btf_type_tag-typedef-field.c clang/test/CodeGen/attr-btf_type_tag-var.c llvm/include/llvm/IR/DIBuilder.h llvm/include/llvm/IR/DebugInfoMetadata.h llvm/lib/AsmParser/LLParser.cpp llvm/lib/Bitcode/Reader/MetadataLoader.cpp llvm/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp llvm/lib/IR/AsmWriter.cpp llvm/lib/IR/DIBuilder.cpp llvm/lib/IR/DebugInfoMetadata.cpp llvm/lib/IR/LLVMContextImpl.h
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 70cddb3ddf..457de32a05 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -369,11 +369,11 @@ DIBuilder::createTemplateAlias(DIType *Ty, StringRef Name, DIFile *File,
 
 DIDerivedType *
 DIBuilder::createAnnotationsPlaceholder(DIType *Ty, DINodeArray Annotations) {
-  auto *RetTy =
-      DIDerivedType::getTemporary(
-          VMContext, dwarf::DW_TAG_LLVM_annotation, "", nullptr, 0, nullptr, Ty,
-          0, 0, 0, std::nullopt, std::nullopt, DINode::FlagZero, nullptr, Annotations)
-          .release();
+  auto *RetTy = DIDerivedType::getTemporary(
+                    VMContext, dwarf::DW_TAG_LLVM_annotation, "", nullptr, 0,
+                    nullptr, Ty, 0, 0, 0, std::nullopt, std::nullopt,
+                    DINode::FlagZero, nullptr, Annotations)
+                    .release();
   trackIfUnresolved(RetTy);
   return RetTy;
 }

``````````

</details>


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


More information about the cfe-commits mailing list