[llvm] [NFC][LLVM] Namespace cleanup in Reg2Mem.cpp (PR #163765)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 16 05:49:37 PDT 2025


https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/163765

None

>From d38cb45eb0b9d8286ed74a71e96e2fc0aa8bd7c6 Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Thu, 16 Oct 2025 05:48:23 -0700
Subject: [PATCH] [NFC][LLVM] Namespace cleanup in Reg2Mem.cpp

---
 llvm/lib/Transforms/Scalar/Reg2Mem.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
index 30b27cb19b4ad..764662441a040 100644
--- a/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
+++ b/llvm/lib/Transforms/Scalar/Reg2Mem.cpp
@@ -107,9 +107,7 @@ PreservedAnalyses RegToMemPass::run(Function &F, FunctionAnalysisManager &AM) {
   return PA;
 }
 
-namespace llvm {
-
-void initializeRegToMemWrapperPassPass(PassRegistry &);
+namespace {
 
 class RegToMemWrapperPass : public FunctionPass {
 public:
@@ -136,7 +134,7 @@ class RegToMemWrapperPass : public FunctionPass {
     return N != 0 || Changed;
   }
 };
-} // namespace llvm
+} // namespace
 
 INITIALIZE_PASS_BEGIN(RegToMemWrapperPass, "reg2mem", "", true, true)
 INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass);



More information about the llvm-commits mailing list