[llvm] [llvm-objcopy][COFF] Update WinCFGuard section contents after stripping (PR #153322)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 13 15:14:05 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,h -- llvm/lib/ObjCopy/COFF/COFFObject.cpp llvm/lib/ObjCopy/COFF/COFFObject.h llvm/lib/ObjCopy/COFF/COFFWriter.cpp llvm/lib/ObjCopy/COFF/COFFWriter.h
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/ObjCopy/COFF/COFFWriter.cpp b/llvm/lib/ObjCopy/COFF/COFFWriter.cpp
index e5f47ad1f..c50efd7c9 100644
--- a/llvm/lib/ObjCopy/COFF/COFFWriter.cpp
+++ b/llvm/lib/ObjCopy/COFF/COFFWriter.cpp
@@ -13,8 +13,8 @@
 #include "llvm/BinaryFormat/COFF.h"
 #include "llvm/Object/COFF.h"
 #include "llvm/Support/CRC.h"
-#include "llvm/Support/Errc.h"
 #include "llvm/Support/Endian.h"
+#include "llvm/Support/Errc.h"
 #include "llvm/Support/ErrorHandling.h"
 #include <cstddef>
 #include <cstdint>
@@ -136,8 +136,9 @@ Error COFFWriter::finalizeCFGuardContents() {
       continue;
 
     // Create updated content
-    ArrayRef<support::ulittle32_t> Ids(reinterpret_cast<const support::ulittle32_t *>(RawIds.data()),
-                              RawIds.size() / 4);
+    ArrayRef<support::ulittle32_t> Ids(
+        reinterpret_cast<const support::ulittle32_t *>(RawIds.data()),
+        RawIds.size() / 4);
     std::vector<support::ulittle32_t> NewIds;
     for (auto Id : Ids)
       NewIds.push_back(support::ulittle32_t(SymIdMap[Id]));

``````````

</details>


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


More information about the llvm-commits mailing list