From fbdff96f965c339730768e0ec211f8af0d602c9b Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Tue, 15 Mar 2022 15:43:45 +0100 Subject: [PATCH] [PATCH 1005/1017] no 'using namespace' in headers Gbp-Pq: Name 1005-no-using-namespace-in-headers.patch --- lib/llvmopencl/BreakConstantGEPs.cpp | 2 ++ lib/llvmopencl/BreakConstantGEPs.h | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/llvmopencl/BreakConstantGEPs.cpp b/lib/llvmopencl/BreakConstantGEPs.cpp index 4ae83a4..ecd285b 100644 --- a/lib/llvmopencl/BreakConstantGEPs.cpp +++ b/lib/llvmopencl/BreakConstantGEPs.cpp @@ -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; diff --git a/lib/llvmopencl/BreakConstantGEPs.h b/lib/llvmopencl/BreakConstantGEPs.h index d5a184d..6b52a29 100644 --- a/lib/llvmopencl/BreakConstantGEPs.h +++ b/lib/llvmopencl/BreakConstantGEPs.h @@ -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(); } -- 2.30.2