[llvm] [CodeGen] Mark MachinePostDominatorTree constructor explicit (PR #96852)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 22:18:41 PDT 2024


https://github.com/paperchalice created https://github.com/llvm/llvm-project/pull/96852

Align with PostDominatorTree.

>From f4b5315a6d4a9b14796259fb93aa3370036b28f3 Mon Sep 17 00:00:00 2001
From: PaperChalice <liujunchang97 at outlook.com>
Date: Thu, 27 Jun 2024 13:16:46 +0800
Subject: [PATCH] [CodeGen] Mark MachinePostDominatorTree constructor explicit
 Align with PostDominatorTree.

---
 llvm/include/llvm/CodeGen/MachinePostDominators.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/include/llvm/CodeGen/MachinePostDominators.h b/llvm/include/llvm/CodeGen/MachinePostDominators.h
index 904c5fcdfc68b..7769d4b426c7a 100644
--- a/llvm/include/llvm/CodeGen/MachinePostDominators.h
+++ b/llvm/include/llvm/CodeGen/MachinePostDominators.h
@@ -49,7 +49,7 @@ class MachinePostDominatorTree : public PostDomTreeBase<MachineBasicBlock> {
 public:
   MachinePostDominatorTree() = default;
 
-  MachinePostDominatorTree(MachineFunction &MF) { recalculate(MF); }
+  explicit MachinePostDominatorTree(MachineFunction &MF) { recalculate(MF); }
 
   /// Handle invalidation explicitly.
   bool invalidate(MachineFunction &, const PreservedAnalyses &PA,



More information about the llvm-commits mailing list