[llvm] Fix memory leak in LLVMTargetMachine.cpp (PR #109610)

via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 22 22:46:43 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 c3d3cef8d58377b02032b07b5f094a402a70435a 586aa68f8b1cfc9805349320205575bfb8fab5da --extensions cpp -- llvm/lib/CodeGen/LLVMTargetMachine.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index f7335de116..4ff22057b2 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -260,7 +260,7 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
   std::unique_ptr<MCCodeEmitter> MCE(
       getTarget().createMCCodeEmitter(*getMCInstrInfo(), *Ctx));
   if (!MCE)
-      return true;
+    return true;
   MCAsmBackend *MAB =
       getTarget().createMCAsmBackend(STI, MRI, Options.MCOptions);
   if (!MAB)

``````````

</details>


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


More information about the llvm-commits mailing list