Skip to content

Commit c4eb880

Browse files
committed
Revert "[LoongArch] Change 'using namespace llvm;' to 'namespace llvm {' in LoongArchTargetParser.cpp. NFC"
This reverts commit 5863214. Reason to revert: These changes are inconsistent with the [[https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions|LLVM stype guide]].
1 parent 12f35b3 commit c4eb880

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/lib/TargetParser/LoongArchTargetParser.cpp

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

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

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

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

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

37-
bool getArchFeatures(StringRef Arch, std::vector<StringRef> &Features) {
37+
bool LoongArch::getArchFeatures(StringRef Arch,
38+
std::vector<StringRef> &Features) {
3839
for (const auto A : AllArchs) {
3940
if (A.Name == Arch) {
4041
for (const auto F : AllFeatures)
@@ -45,5 +46,3 @@ bool getArchFeatures(StringRef Arch, std::vector<StringRef> &Features) {
4546
}
4647
return false;
4748
}
48-
} // namespace LoongArch
49-
} // namespace llvm

0 commit comments

Comments
 (0)