From: Andreas Beckmann Date: Tue, 15 Mar 2022 14:43:45 +0000 (+0100) Subject: [PATCH 1005/1017] no 'using namespace' in headers X-Git-Tag: archive/raspbian/3.0-8+rpi1^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=21e0ff33fb9b31e25e4367c8e42794e001a98f3b;p=pocl.git [PATCH 1005/1017] no 'using namespace' in headers Gbp-Pq: Name 1005-no-using-namespace-in-headers.patch --- 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(); }