[llvm] MCAsmStreamer: Replace the MCInstPrinter * parameter with unique_ptr (PR #135128)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 21:27:00 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,h -- llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h llvm/include/llvm/MC/TargetRegistry.h llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp llvm/lib/DWARFLinker/Classic/DWARFStreamer.cpp llvm/lib/DWARFLinker/Parallel/DWARFEmitterImpl.cpp llvm/lib/DWARFLinker/Parallel/DWARFEmitterImpl.h llvm/lib/MC/MCAsmStreamer.cpp llvm/lib/MC/TargetRegistry.cpp llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp llvm/tools/llvm-mc/llvm-mc.cpp llvm/tools/llvm-ml/llvm-ml.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/MC/TargetRegistry.h b/llvm/include/llvm/MC/TargetRegistry.h
index 48d4c30b9..e709ed6d6 100644
--- a/llvm/include/llvm/MC/TargetRegistry.h
+++ b/llvm/include/llvm/MC/TargetRegistry.h
@@ -209,10 +209,11 @@ public:
   using AsmTargetStreamerCtorTy =
       MCTargetStreamer *(*)(MCStreamer &S, formatted_raw_ostream &OS,
                             MCInstPrinter *InstPrint);
-  using AsmStreamerCtorTy = MCStreamer
-      *(*)(MCContext & Ctx, std::unique_ptr<formatted_raw_ostream> OS,
-           std::unique_ptr<MCInstPrinter> IP, std::unique_ptr<MCCodeEmitter> CE,
-           std::unique_ptr<MCAsmBackend> TAB);
+  using AsmStreamerCtorTy =
+      MCStreamer *(*)(MCContext &Ctx, std::unique_ptr<formatted_raw_ostream> OS,
+                      std::unique_ptr<MCInstPrinter> IP,
+                      std::unique_ptr<MCCodeEmitter> CE,
+                      std::unique_ptr<MCAsmBackend> TAB);
   using ObjectTargetStreamerCtorTy =
       MCTargetStreamer *(*)(MCStreamer &S, const MCSubtargetInfo &STI);
   using MCRelocationInfoCtorTy = MCRelocationInfo *(*)(const Triple &TT,

``````````

</details>


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


More information about the llvm-commits mailing list