[llvm] [MC] Relaxable Fragments Can be Linker Relaxable (PR #150096)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jul 22 12:47:49 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/MC/MCAssembler.cpp llvm/lib/MC/MCExpr.cpp llvm/lib/MC/MCFragment.cpp llvm/lib/MC/MCSection.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp
index c3ccdb3e3..45c73489f 100644
--- a/llvm/lib/MC/MCExpr.cpp
+++ b/llvm/lib/MC/MCExpr.cpp
@@ -361,7 +361,8 @@ static void attemptToFoldSymbolOffsetDifference(const MCAssembler *Asm,
         if (BBeforeRelax && AAfterRelax)
           return;
       }
-      if (F->getKind() == MCFragment::FT_Relaxable && Asm->hasFinalLayout() && F->isLinkerRelaxable())
+      if (F->getKind() == MCFragment::FT_Relaxable && Asm->hasFinalLayout() &&
+          F->isLinkerRelaxable())
         // FIXME: More accurate calculation of AAfterRelax/BBeforeRelax?
         return;
       if (&*F == FA) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/150096
    
    
More information about the llvm-commits
mailing list