[llvm] Bitcode: Stop combining function alignments into MaxAlignment. (PR #155341)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 25 18:53:50 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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index a1d5b36bd..e0e0bf149 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1499,7 +1499,8 @@ void ModuleBitcodeWriter::writeModuleInfo() {
   unsigned MaxGlobalType = 0;
   for (const GlobalVariable &GV : M.globals()) {
     if (MaybeAlign A = GV.getAlign())
-      MaxGVarAlignment = !MaxGVarAlignment ? *A : std::max(*MaxGVarAlignment, *A);
+      MaxGVarAlignment =
+          !MaxGVarAlignment ? *A : std::max(*MaxGVarAlignment, *A);
     MaxGlobalType = std::max(MaxGlobalType, VE.getTypeID(GV.getValueType()));
     if (GV.hasSection()) {
       // Give section names unique ID's.

``````````

</details>


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


More information about the llvm-commits mailing list