[llvm] d2b27ca - [NFC][LLVM] Namespace cleanup in GuardWidening (#163585)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 15 17:16:24 PDT 2025


Author: Rahul Joshi
Date: 2025-10-15T17:16:20-07:00
New Revision: d2b27caec60dceb543ff2ce0800317d120c92ccb

URL: https://github.com/llvm/llvm-project/commit/d2b27caec60dceb543ff2ce0800317d120c92ccb
DIFF: https://github.com/llvm/llvm-project/commit/d2b27caec60dceb543ff2ce0800317d120c92ccb.diff

LOG: [NFC][LLVM] Namespace cleanup in GuardWidening (#163585)

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/GuardWidening.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/GuardWidening.cpp b/llvm/lib/Transforms/Scalar/GuardWidening.cpp
index d99f1eb9c93cd..ddb99a5af6089 100644
--- a/llvm/lib/Transforms/Scalar/GuardWidening.cpp
+++ b/llvm/lib/Transforms/Scalar/GuardWidening.cpp
@@ -75,8 +75,6 @@ static cl::opt<bool>
                                "expressed as branches by widenable conditions"),
                       cl::init(true));
 
-namespace {
-
 // Get the condition of \p I. It can either be a guard or a conditional branch.
 static Value *getCondition(Instruction *I) {
   if (IntrinsicInst *GI = dyn_cast<IntrinsicInst>(I)) {
@@ -130,6 +128,8 @@ findInsertionPointForWideCondition(Instruction *WCOrGuard) {
   return std::nullopt;
 }
 
+namespace {
+
 class GuardWideningImpl {
   DominatorTree &DT;
   PostDominatorTree *PDT;
@@ -328,7 +328,7 @@ class GuardWideningImpl {
   /// The entry point for this pass.
   bool run();
 };
-}
+} // namespace
 
 static bool isSupportedGuardInstruction(const Instruction *Insn) {
   if (isGuard(Insn))


        


More information about the llvm-commits mailing list