[llvm] [llvm][ELF] Correctly set the .llvm.lto section type (PR #92820)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 14:01:56 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 81f34afa5c39584c2721000e2bcf3b8ec02a4f4d 6fd78a3386cd36a8df10ac3b995a9168667a6e27 -- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 567e944375..f22353ecf8 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -527,7 +527,7 @@ static unsigned getELFSectionType(StringRef Name, SectionKind K) {
   if (K.isBSS() || K.isThreadBSS())
     return ELF::SHT_NOBITS;
 
-  if(hasPrefix(Name, ".llvm.lto"))
+  if (hasPrefix(Name, ".llvm.lto"))
     return ELF::SHT_LLVM_LTO;
 
   return ELF::SHT_PROGBITS;

``````````

</details>


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


More information about the llvm-commits mailing list