Skip to content

Commit ff81bbe

Browse files
committed
[AMDGPU] Concatenate nested namespaces. NFC.
1 parent 6bba44e commit ff81bbe

File tree

6 files changed

+11
-25
lines changed

6 files changed

+11
-25
lines changed

llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ static cl::opt<bool> VerifyHSAMetadata(
4747
"amdgpu-verify-hsa-metadata",
4848
cl::desc("Verify AMDGPU HSA Metadata"));
4949

50-
namespace AMDGPU {
51-
namespace HSAMD {
50+
namespace AMDGPU::HSAMD {
5251

5352
//===----------------------------------------------------------------------===//
5453
// HSAMetadataStreamerV4
@@ -707,6 +706,5 @@ void MetadataStreamerMsgPackV6::emitVersion() {
707706
getRootMetadata("amdhsa.version") = Version;
708707
}
709708

710-
} // end namespace HSAMD
711-
} // end namespace AMDGPU
709+
} // end namespace AMDGPU::HSAMD
712710
} // end namespace llvm

llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
#include "llvm/MC/TargetRegistry.h"
1919
#include "llvm/Support/WithColor.h"
2020

21-
namespace llvm {
22-
namespace mca {
21+
namespace llvm::mca {
2322

2423
void AMDGPUInstrPostProcess::postProcessInstruction(
2524
std::unique_ptr<Instruction> &Inst, const MCInst &MCI) {
@@ -332,8 +331,7 @@ bool AMDGPUCustomBehaviour::isAlwaysGDS(uint16_t Opcode) const {
332331
return Opcode == AMDGPU::DS_ORDERED_COUNT || isGWS(Opcode);
333332
}
334333

335-
} // namespace mca
336-
} // namespace llvm
334+
} // namespace llvm::mca
337335

338336
using namespace llvm;
339337
using namespace mca;

llvm/lib/Target/AMDGPU/SIInstrInfo.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ using namespace llvm;
4040
#define GET_INSTRINFO_CTOR_DTOR
4141
#include "AMDGPUGenInstrInfo.inc"
4242

43-
namespace llvm {
44-
namespace AMDGPU {
43+
namespace llvm::AMDGPU {
4544
#define GET_D16ImageDimIntrinsics_IMPL
4645
#define GET_ImageDimIntrinsicTable_IMPL
4746
#define GET_RsrcIntrinsics_IMPL
4847
#include "AMDGPUGenSearchableTables.inc"
4948
}
50-
}
5149

5250

5351
// Must be at least 4 to be able to branch over minimum unconditional branch

llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ static const char *getReasonStr(SIScheduleCandReason Reason) {
135135

136136
#endif
137137

138-
namespace llvm {
139-
namespace SISched {
138+
namespace llvm::SISched {
140139
static bool tryLess(int TryVal, int CandVal,
141140
SISchedulerCandidate &TryCand,
142141
SISchedulerCandidate &Cand,
@@ -170,8 +169,7 @@ static bool tryGreater(int TryVal, int CandVal,
170169
Cand.setRepeat(Reason);
171170
return false;
172171
}
173-
} // end namespace SISched
174-
} // end namespace llvm
172+
} // end namespace llvm::SISched
175173

176174
// SIScheduleBlock //
177175

llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
#include "AMDGPUBaseInfo.h"
1010
#include "SIDefines.h"
1111

12-
namespace llvm {
13-
namespace AMDGPU {
12+
namespace llvm::AMDGPU {
1413

1514
//===----------------------------------------------------------------------===//
1615
// Custom Operands.
@@ -684,5 +683,4 @@ ArrayRef<GFXVersion> getGFXVersions() {
684683

685684
} // namespace UCVersion
686685

687-
} // namespace AMDGPU
688-
} // namespace llvm
686+
} // namespace llvm::AMDGPU

llvm/lib/Target/AMDGPU/Utils/AMDGPUMemoryUtils.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525

2626
using namespace llvm;
2727

28-
namespace llvm {
29-
30-
namespace AMDGPU {
28+
namespace llvm::AMDGPU {
3129

3230
Align getAlign(const DataLayout &DL, const GlobalVariable *GV) {
3331
return DL.getValueOrABITypeAlignment(GV->getPointerAlignment(DL),
@@ -371,6 +369,4 @@ bool isClobberedInFunction(const LoadInst *Load, MemorySSA *MSSA,
371369
return false;
372370
}
373371

374-
} // end namespace AMDGPU
375-
376-
} // end namespace llvm
372+
} // end namespace llvm::AMDGPU

0 commit comments

Comments
 (0)