[llvm] [XCOFF] Use RLDs to print branches even without -r (PR #74342)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 09:04:33 PST 2023


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 bbd2b08b95fe76bea138c1b03c1cd42ed3ee04df 4d255c7164b92e6dbfa34226d31055f9438855f0 -- llvm/tools/llvm-objdump/llvm-objdump.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 8645625a36..45b26cd0bd 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -1323,8 +1323,8 @@ collectLocalBranchTargets(ArrayRef<uint8_t> Bytes, MCInstrAnalysis *MIA,
           // On PowerPC and AIX, a function call is encoded as a branch to 0.
           // On other PowerPC platforms (ELF), a function call is encoded as
           // a branch to self. Do not add a label for these cases.
-          if (!(isPPC && ((Target == 0 && isXCOFF) ||
-                  (Target == Index && !isXCOFF))))
+          if (!(isPPC &&
+                ((Target == 0 && isXCOFF) || (Target == Index && !isXCOFF))))
             Labels[Target] = ("L" + Twine(LabelCount++)).str();
         }
         MIA->updateState(Inst, Index);
@@ -2271,7 +2271,7 @@ disassembleObject(ObjectFile &Obj, const ObjectFile &DbgObj,
             }
 
             printRelocation(FOS, Obj.getFileName(), *RelCur,
-                          SectionAddr + RelOffset, Is64Bits);
+                            SectionAddr + RelOffset, Is64Bits);
             LVP.printAfterOtherLine(FOS, true);
             ++RelCur;
           }

``````````

</details>


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


More information about the llvm-commits mailing list