Skip to content

Commit

Permalink
Remove a top-level "using namespace" in TargetTransformInfoImpl.h
Browse files Browse the repository at this point in the history
Avoids polluting the namespace of all files including the header.
  • Loading branch information
labath committed Mar 15, 2022
1 parent 5e8700c commit 991dc4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
Expand Up @@ -24,8 +24,6 @@
#include "llvm/IR/PatternMatch.h"
#include <utility>

using namespace llvm::PatternMatch;

namespace llvm {

class Function;
Expand Down Expand Up @@ -960,6 +958,8 @@ class TargetTransformInfoImplCRTPBase : public TargetTransformInfoImplBase {

InstructionCost getUserCost(const User *U, ArrayRef<const Value *> Operands,
TTI::TargetCostKind CostKind) {
using namespace llvm::PatternMatch;

auto *TargetTTI = static_cast<T *>(this);
// Handle non-intrinsic calls, invokes, and callbr.
// FIXME: Unlikely to be true for anything but CodeSize.
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Expand Up @@ -57,6 +57,7 @@
#include "llvm/Transforms/Vectorize.h"

using namespace llvm;
using namespace llvm::PatternMatch;

namespace {
class SGPRRegisterRegAlloc : public RegisterRegAllocBase<SGPRRegisterRegAlloc> {
Expand Down

0 comments on commit 991dc4b

Please sign in to comment.