Skip to content

Commit 5863214

Browse files
committed
[LoongArch] Change 'using namespace llvm;' to 'namespace llvm {' in LoongArchTargetParser.cpp. NFC
And change 'using namespace llvm::LoongArch' to 'namespace LoongArch {' to simplify the code a little bit.
1 parent ef9421d commit 5863214

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/lib/TargetParser/LoongArchTargetParser.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
#include "llvm/TargetParser/LoongArchTargetParser.h"
1515

16-
using namespace llvm;
17-
using namespace llvm::LoongArch;
16+
namespace llvm {
17+
namespace LoongArch {
1818

1919
const FeatureInfo AllFeatures[] = {
2020
#define LOONGARCH_FEATURE(NAME, KIND) {NAME, KIND},
@@ -27,15 +27,14 @@ const ArchInfo AllArchs[] = {
2727
#include "llvm/TargetParser/LoongArchTargetParser.def"
2828
};
2929

30-
bool LoongArch::isValidArchName(StringRef Arch) {
30+
bool isValidArchName(StringRef Arch) {
3131
for (const auto A : AllArchs)
3232
if (A.Name == Arch)
3333
return true;
3434
return false;
3535
}
3636

37-
bool LoongArch::getArchFeatures(StringRef Arch,
38-
std::vector<StringRef> &Features) {
37+
bool getArchFeatures(StringRef Arch, std::vector<StringRef> &Features) {
3938
for (const auto A : AllArchs) {
4039
if (A.Name == Arch) {
4140
for (const auto F : AllFeatures)
@@ -46,3 +45,5 @@ bool LoongArch::getArchFeatures(StringRef Arch,
4645
}
4746
return false;
4847
}
48+
} // namespace LoongArch
49+
} // namespace llvm

0 commit comments

Comments
 (0)