Skip to content

Commit 31efecf

Browse files
committed
Remove a top-level "using namespace" from TargetTransformInfoImpl.h
Move it into the implementation of the function that needs it. Avoids polluting the namespace of all files including the header.
1 parent 11511e9 commit 31efecf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/Analysis/TargetTransformInfoImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#include "llvm/IR/PatternMatch.h"
2525
#include <utility>
2626

27-
using namespace llvm::PatternMatch;
28-
2927
namespace llvm {
3028

3129
class Function;
@@ -960,6 +958,8 @@ class TargetTransformInfoImplCRTPBase : public TargetTransformInfoImplBase {
960958

961959
InstructionCost getUserCost(const User *U, ArrayRef<const Value *> Operands,
962960
TTI::TargetCostKind CostKind) {
961+
using namespace llvm::PatternMatch;
962+
963963
auto *TargetTTI = static_cast<T *>(this);
964964
// Handle non-intrinsic calls, invokes, and callbr.
965965
// FIXME: Unlikely to be true for anything but CodeSize.

0 commit comments

Comments
 (0)