[llvm] Jump table annotations for Linux (PR #112606)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 12:58:03 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 5000c688bf9dad3ed5ec98cf427b3c5160e6e74c 0ebcd5d857a0dadf4f1df766bac7ecfb602d58c7 --extensions h,cpp -- llvm/include/llvm/CodeGen/AsmPrinter.h llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h
index fabe5bc226..7c95cf35b9 100644
--- a/llvm/include/llvm/CodeGen/AsmPrinter.h
+++ b/llvm/include/llvm/CodeGen/AsmPrinter.h
@@ -455,7 +455,8 @@ public:
 
   /// Emit jump table annotations correlating each table with its associated
   /// indirect branch instruction.
-  virtual void emitJumpTableAnnotation(const MachineFunction &MF, const MachineInstr &MI);
+  virtual void emitJumpTableAnnotation(const MachineFunction &MF,
+                                       const MachineInstr &MI);
 
   /// Emit the specified global variable to the .s file.
   virtual void emitGlobalVariable(const GlobalVariable *GV);
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 4563ed98a4..f14b843219 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1542,12 +1542,10 @@ void AsmPrinter::emitJumpTableAnnotation(const MachineFunction &MF,
 
   const MCExpr *OffsetExpr =
       MCSymbolRefExpr::create(ProvenanceLabel, OutContext);
-  const MCExpr *JTISymbolExpr =
-      MCSymbolRefExpr::create(JTISymbol, OutContext);
+  const MCExpr *JTISymbolExpr = MCSymbolRefExpr::create(JTISymbol, OutContext);
 
-  OutStreamer->emitRelocDirective(*OffsetExpr, "BFD_RELOC_NONE",
-                                  JTISymbolExpr, SMLoc(),
-                                  *OutContext.getSubtargetInfo());
+  OutStreamer->emitRelocDirective(*OffsetExpr, "BFD_RELOC_NONE", JTISymbolExpr,
+                                  SMLoc(), *OutContext.getSubtargetInfo());
   OutStreamer->emitLabel(ProvenanceLabel);
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list