[llvm] [BOLT] Correctly print preferred disassembly for annotated instructions (PR #120564)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 04:13:25 PST 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 2be41e7aee1c72177019a219ccd8e0cfccdbb52b 60dae85ef3d04f93868e40f4e2921d2167bcd434 --extensions cpp -- bolt/lib/Core/BinaryContext.cpp
``````````

</details>

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

``````````diff
diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp
index 0fcbf7452c..f88e34b8e8 100644
--- a/bolt/lib/Core/BinaryContext.cpp
+++ b/bolt/lib/Core/BinaryContext.cpp
@@ -1961,12 +1961,12 @@ void BinaryContext::printInstruction(raw_ostream &OS, const MCInst &Instruction,
     OS << "\tjit\t" << MIB->getTargetSymbol(Instruction)->getName()
        << " # ID: " << DynamicID;
   } else {
-    // If there are annotations on the instruction, the MCInstPrinter will fail to
-    // print the preferred alias as it only does so when the number of operands is
-    // as expected. See
+    // If there are annotations on the instruction, the MCInstPrinter will fail
+    // to print the preferred alias as it only does so when the number of
+    // operands is as expected. See
     // https://github.com/llvm/llvm-project/blob/782f1a0d895646c364a53f9dcdd6d4ec1f3e5ea0/llvm/lib/MC/MCInstPrinter.cpp#L142
-    // Therefore, create a temporary copy of the Inst from which the annotations are
-    // removed, and print that Inst.
+    // Therefore, create a temporary copy of the Inst from which the annotations
+    // are removed, and print that Inst.
     MCInst InstNoAnnot = Instruction;
     MIB->stripAnnotations(InstNoAnnot);
     InstPrinter->printInst(&InstNoAnnot, 0, "", *STI, OS);

``````````

</details>


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


More information about the llvm-commits mailing list