Skip to content

Commit 5daecd4

Browse files
committed

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

llvm/lib/Support/AArch64BuildAttributes.cpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#include "llvm/Support/AArch64BuildAttributes.h"
1010
#include "llvm/ADT/StringSwitch.h"
1111

12-
namespace llvm {
13-
namespace AArch64BuildAttributes {
12+
using namespace llvm;
13+
using namespace llvm::AArch64BuildAttributes;
1414

15-
StringRef getVendorName(unsigned Vendor) {
15+
StringRef AArch64BuildAttributes::getVendorName(unsigned Vendor) {
1616
switch (Vendor) {
1717
case AEABI_FEATURE_AND_BITS:
1818
return "aeabi_feature_and_bits";
@@ -25,14 +25,14 @@ StringRef getVendorName(unsigned Vendor) {
2525
return "";
2626
}
2727
}
28-
VendorID getVendorID(StringRef Vendor) {
28+
VendorID AArch64BuildAttributes::getVendorID(StringRef Vendor) {
2929
return StringSwitch<VendorID>(Vendor)
3030
.Case("aeabi_feature_and_bits", AEABI_FEATURE_AND_BITS)
3131
.Case("aeabi_pauthabi", AEABI_PAUTHABI)
3232
.Default(VENDOR_UNKNOWN);
3333
}
3434

35-
StringRef getOptionalStr(unsigned Optional) {
35+
StringRef AArch64BuildAttributes::getOptionalStr(unsigned Optional) {
3636
switch (Optional) {
3737
case REQUIRED:
3838
return "required";
@@ -43,18 +43,18 @@ StringRef getOptionalStr(unsigned Optional) {
4343
return "";
4444
}
4545
}
46-
SubsectionOptional getOptionalID(StringRef Optional) {
46+
SubsectionOptional AArch64BuildAttributes::getOptionalID(StringRef Optional) {
4747
return StringSwitch<SubsectionOptional>(Optional)
4848
.Case("required", REQUIRED)
4949
.Case("optional", OPTIONAL)
5050
.Default(OPTIONAL_NOT_FOUND);
5151
}
52-
StringRef getSubsectionOptionalUnknownError() {
52+
StringRef AArch64BuildAttributes::getSubsectionOptionalUnknownError() {
5353
return "unknown AArch64 build attributes optionality, expected "
5454
"required|optional";
5555
}
5656

57-
StringRef getTypeStr(unsigned Type) {
57+
StringRef AArch64BuildAttributes::getTypeStr(unsigned Type) {
5858
switch (Type) {
5959
case ULEB128:
6060
return "uleb128";
@@ -65,17 +65,17 @@ StringRef getTypeStr(unsigned Type) {
6565
return "";
6666
}
6767
}
68-
SubsectionType getTypeID(StringRef Type) {
68+
SubsectionType AArch64BuildAttributes::getTypeID(StringRef Type) {
6969
return StringSwitch<SubsectionType>(Type)
7070
.Cases("uleb128", "ULEB128", ULEB128)
7171
.Cases("ntbs", "NTBS", NTBS)
7272
.Default(TYPE_NOT_FOUND);
7373
}
74-
StringRef getSubsectionTypeUnknownError() {
74+
StringRef AArch64BuildAttributes::getSubsectionTypeUnknownError() {
7575
return "unknown AArch64 build attributes type, expected uleb128|ntbs";
7676
}
7777

78-
StringRef getPauthABITagsStr(unsigned PauthABITag) {
78+
StringRef AArch64BuildAttributes::getPauthABITagsStr(unsigned PauthABITag) {
7979
switch (PauthABITag) {
8080
case TAG_PAUTH_PLATFORM:
8181
return "Tag_PAuth_Platform";
@@ -86,14 +86,16 @@ StringRef getPauthABITagsStr(unsigned PauthABITag) {
8686
return "";
8787
}
8888
}
89-
PauthABITags getPauthABITagsID(StringRef PauthABITag) {
89+
90+
PauthABITags AArch64BuildAttributes::getPauthABITagsID(StringRef PauthABITag) {
9091
return StringSwitch<PauthABITags>(PauthABITag)
9192
.Case("Tag_PAuth_Platform", TAG_PAUTH_PLATFORM)
9293
.Case("Tag_PAuth_Schema", TAG_PAUTH_SCHEMA)
9394
.Default(PAUTHABI_TAG_NOT_FOUND);
9495
}
9596

96-
StringRef getFeatureAndBitsTagsStr(unsigned FeatureAndBitsTag) {
97+
StringRef
98+
AArch64BuildAttributes::getFeatureAndBitsTagsStr(unsigned FeatureAndBitsTag) {
9799
switch (FeatureAndBitsTag) {
98100
case TAG_FEATURE_BTI:
99101
return "Tag_Feature_BTI";
@@ -106,12 +108,12 @@ StringRef getFeatureAndBitsTagsStr(unsigned FeatureAndBitsTag) {
106108
return "";
107109
}
108110
}
109-
FeatureAndBitsTags getFeatureAndBitsTagsID(StringRef FeatureAndBitsTag) {
111+
112+
FeatureAndBitsTags
113+
AArch64BuildAttributes::getFeatureAndBitsTagsID(StringRef FeatureAndBitsTag) {
110114
return StringSwitch<FeatureAndBitsTags>(FeatureAndBitsTag)
111115
.Case("Tag_Feature_BTI", TAG_FEATURE_BTI)
112116
.Case("Tag_Feature_PAC", TAG_FEATURE_PAC)
113117
.Case("Tag_Feature_GCS", TAG_FEATURE_GCS)
114118
.Default(FEATURE_AND_BITS_TAG_NOT_FOUND);
115119
}
116-
} // namespace AArch64BuildAttributes
117-
} // namespace llvm

0 commit comments

Comments
 (0)