Skip to content

Conversation

jurahul
Copy link
Contributor

@jurahul jurahul commented Oct 9, 2025

Fix indentation for LowerInvokeLegacyPass and use namespace qualifiers for defining variables and functions in llvm namespace.

@jurahul jurahul marked this pull request as ready for review October 9, 2025 17:22
@llvmbot
Copy link
Member

llvmbot commented Oct 9, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Rahul Joshi (jurahul)

Changes

Fix indentation for LowerInvokeLegacyPass and use namespace qualifiers for defining variables and functions in llvm namespace.


Full diff: https://github.com/llvm/llvm-project/pull/162691.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Utils/LowerInvoke.cpp (+13-13)
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index ff2ab3c6dce9c..cecb6629773f1 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
@@ -27,15 +27,15 @@ using namespace llvm;
 STATISTIC(NumInvokes, "Number of invokes replaced");
 
 namespace {
-  class LowerInvokeLegacyPass : public FunctionPass {
-  public:
-    static char ID; // Pass identification, replacement for typeid
-    explicit LowerInvokeLegacyPass() : FunctionPass(ID) {
-      initializeLowerInvokeLegacyPassPass(*PassRegistry::getPassRegistry());
-    }
-    bool runOnFunction(Function &F) override;
-  };
-}
+class LowerInvokeLegacyPass : public FunctionPass {
+public:
+  static char ID; // Pass identification, replacement for typeid
+  explicit LowerInvokeLegacyPass() : FunctionPass(ID) {
+    initializeLowerInvokeLegacyPassPass(*PassRegistry::getPassRegistry());
+  }
+  bool runOnFunction(Function &F) override;
+};
+} // namespace
 
 char LowerInvokeLegacyPass::ID = 0;
 INITIALIZE_PASS(LowerInvokeLegacyPass, "lowerinvoke",
@@ -78,11 +78,12 @@ bool LowerInvokeLegacyPass::runOnFunction(Function &F) {
   return runImpl(F);
 }
 
-namespace llvm {
-char &LowerInvokePassID = LowerInvokeLegacyPass::ID;
+char &llvm::LowerInvokePassID = LowerInvokeLegacyPass::ID;
 
 // Public Interface To the LowerInvoke pass.
-FunctionPass *createLowerInvokePass() { return new LowerInvokeLegacyPass(); }
+FunctionPass *llvm::createLowerInvokePass() {
+  return new LowerInvokeLegacyPass();
+}
 
 PreservedAnalyses LowerInvokePass::run(Function &F,
                                        FunctionAnalysisManager &AM) {
@@ -92,4 +93,3 @@ PreservedAnalyses LowerInvokePass::run(Function &F,
 
   return PreservedAnalyses::none();
 }
-}

@jurahul jurahul merged commit ea5648b into llvm:main Oct 10, 2025
13 checks passed
@jurahul jurahul deleted the nfc_codecleanup_LowerInvoke branch October 10, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants