[PATCH 1005/1017] no 'using namespace' in headers
authorAndreas Beckmann <anbe@debian.org>
Tue, 15 Mar 2022 14:43:45 +0000 (15:43 +0100)
committerAndreas Beckmann <anbe@debian.org>
Tue, 13 Dec 2022 03:08:31 +0000 (03:08 +0000)
Gbp-Pq: Name 1005-no-using-namespace-in-headers.patch

lib/llvmopencl/BreakConstantGEPs.cpp
lib/llvmopencl/BreakConstantGEPs.h

index 4ae83a47998467bce8f35cc1149b392d16c80bd3..ecd285b0e286e761293fe19454a5151f7a872d14 100644 (file)
@@ -38,6 +38,8 @@ IGNORE_COMPILER_WARNING("-Wunused-parameter")
 #include "BreakConstantGEPs.h"
 #include "Workgroup.h"
 
+using namespace llvm;
+
 // Identifier variable for the pass
 char BreakConstantGEPs::ID = 0;
 
index d5a184dcdac6cbe3a6b84537325206adc11895ba..6b52a2962618265cac6f5dbc22042631d88e2b69 100644 (file)
@@ -24,8 +24,6 @@
 #include "llvm/IR/Module.h"
 #include "llvm/Pass.h"
 
-using namespace llvm;
-
 //
 // Pass: BreakConstantGEPs
 //
@@ -33,7 +31,8 @@ using namespace llvm;
 //  This pass modifies a function so that it uses GEP instructions instead of
 //  GEP constant expressions.
 //
-struct BreakConstantGEPs : public FunctionPass {
+struct BreakConstantGEPs : public llvm::FunctionPass
+{
   private:
     // Private methods
 
@@ -43,8 +42,8 @@ struct BreakConstantGEPs : public FunctionPass {
     static char ID;
     BreakConstantGEPs() : FunctionPass(ID) {}
     llvm::StringRef getPassName() const override {return "Remove Constant GEP Expressions";}
-    virtual bool runOnFunction (Function & F) override;
-    virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
+  virtual bool runOnFunction (llvm::Function &F) override;
+  virtual void getAnalysisUsage(llvm::AnalysisUsage &AU) const override {
       // This pass does not modify the control-flow graph of the function
       AU.setPreservesCFG();
     }