[llvm] [llvm][AsmPrinter] Call graph section format. (PR #159866)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 16:00:35 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/include/llvm/CodeGen/AsmPrinter.h llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
``````````

: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/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 32b0aca23..10c1a5a1f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1693,16 +1693,19 @@ void AsmPrinter::emitCallGraphSection(const MachineFunction &MF,
                                               /*IgnoreAssumeLikeCalls=*/true,
                                               /*IgnoreLLVMUsed=*/false);
     if (!IsIndirectTarget) {
-      OutStreamer->emitInt8(static_cast<uint8_t>(FunctionKind::NOT_INDIRECT_TARGET));
+      OutStreamer->emitInt8(
+          static_cast<uint8_t>(FunctionKind::NOT_INDIRECT_TARGET));
       return;
     }
 
     if (const auto *TypeId = extractNumericCGTypeId(F)) {
-      OutStreamer->emitInt8(static_cast<uint8_t>(FunctionKind::INDIRECT_TARGET_KNOWN_TID));
+      OutStreamer->emitInt8(
+          static_cast<uint8_t>(FunctionKind::INDIRECT_TARGET_KNOWN_TID));
       OutStreamer->emitInt64(TypeId->getZExtValue());
       return;
     }
-    OutStreamer->emitInt8(static_cast<uint8_t>(FunctionKind::INDIRECT_TARGET_UNKNOWN_TID));
+    OutStreamer->emitInt8(
+        static_cast<uint8_t>(FunctionKind::INDIRECT_TARGET_UNKNOWN_TID));
   };
 
   // Emit function's call graph information.

``````````

</details>


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


More information about the llvm-commits mailing list