9
9
#include " llvm/Support/AArch64BuildAttributes.h"
10
10
#include " llvm/ADT/StringSwitch.h"
11
11
12
- namespace llvm {
13
- namespace AArch64BuildAttributes {
12
+ using namespace llvm ;
13
+ using namespace llvm :: AArch64BuildAttributes;
14
14
15
- StringRef getVendorName (unsigned Vendor) {
15
+ StringRef AArch64BuildAttributes:: getVendorName (unsigned Vendor) {
16
16
switch (Vendor) {
17
17
case AEABI_FEATURE_AND_BITS:
18
18
return " aeabi_feature_and_bits" ;
@@ -25,14 +25,14 @@ StringRef getVendorName(unsigned Vendor) {
25
25
return " " ;
26
26
}
27
27
}
28
- VendorID getVendorID (StringRef Vendor) {
28
+ VendorID AArch64BuildAttributes:: getVendorID (StringRef Vendor) {
29
29
return StringSwitch<VendorID>(Vendor)
30
30
.Case (" aeabi_feature_and_bits" , AEABI_FEATURE_AND_BITS)
31
31
.Case (" aeabi_pauthabi" , AEABI_PAUTHABI)
32
32
.Default (VENDOR_UNKNOWN);
33
33
}
34
34
35
- StringRef getOptionalStr (unsigned Optional) {
35
+ StringRef AArch64BuildAttributes:: getOptionalStr (unsigned Optional) {
36
36
switch (Optional) {
37
37
case REQUIRED:
38
38
return " required" ;
@@ -43,18 +43,18 @@ StringRef getOptionalStr(unsigned Optional) {
43
43
return " " ;
44
44
}
45
45
}
46
- SubsectionOptional getOptionalID (StringRef Optional) {
46
+ SubsectionOptional AArch64BuildAttributes:: getOptionalID (StringRef Optional) {
47
47
return StringSwitch<SubsectionOptional>(Optional)
48
48
.Case (" required" , REQUIRED)
49
49
.Case (" optional" , OPTIONAL)
50
50
.Default (OPTIONAL_NOT_FOUND);
51
51
}
52
- StringRef getSubsectionOptionalUnknownError () {
52
+ StringRef AArch64BuildAttributes:: getSubsectionOptionalUnknownError () {
53
53
return " unknown AArch64 build attributes optionality, expected "
54
54
" required|optional" ;
55
55
}
56
56
57
- StringRef getTypeStr (unsigned Type) {
57
+ StringRef AArch64BuildAttributes:: getTypeStr (unsigned Type) {
58
58
switch (Type) {
59
59
case ULEB128:
60
60
return " uleb128" ;
@@ -65,17 +65,17 @@ StringRef getTypeStr(unsigned Type) {
65
65
return " " ;
66
66
}
67
67
}
68
- SubsectionType getTypeID (StringRef Type) {
68
+ SubsectionType AArch64BuildAttributes:: getTypeID (StringRef Type) {
69
69
return StringSwitch<SubsectionType>(Type)
70
70
.Cases (" uleb128" , " ULEB128" , ULEB128)
71
71
.Cases (" ntbs" , " NTBS" , NTBS)
72
72
.Default (TYPE_NOT_FOUND);
73
73
}
74
- StringRef getSubsectionTypeUnknownError () {
74
+ StringRef AArch64BuildAttributes:: getSubsectionTypeUnknownError () {
75
75
return " unknown AArch64 build attributes type, expected uleb128|ntbs" ;
76
76
}
77
77
78
- StringRef getPauthABITagsStr (unsigned PauthABITag) {
78
+ StringRef AArch64BuildAttributes:: getPauthABITagsStr (unsigned PauthABITag) {
79
79
switch (PauthABITag) {
80
80
case TAG_PAUTH_PLATFORM:
81
81
return " Tag_PAuth_Platform" ;
@@ -86,14 +86,16 @@ StringRef getPauthABITagsStr(unsigned PauthABITag) {
86
86
return " " ;
87
87
}
88
88
}
89
- PauthABITags getPauthABITagsID (StringRef PauthABITag) {
89
+
90
+ PauthABITags AArch64BuildAttributes::getPauthABITagsID (StringRef PauthABITag) {
90
91
return StringSwitch<PauthABITags>(PauthABITag)
91
92
.Case (" Tag_PAuth_Platform" , TAG_PAUTH_PLATFORM)
92
93
.Case (" Tag_PAuth_Schema" , TAG_PAUTH_SCHEMA)
93
94
.Default (PAUTHABI_TAG_NOT_FOUND);
94
95
}
95
96
96
- StringRef getFeatureAndBitsTagsStr (unsigned FeatureAndBitsTag) {
97
+ StringRef
98
+ AArch64BuildAttributes::getFeatureAndBitsTagsStr (unsigned FeatureAndBitsTag) {
97
99
switch (FeatureAndBitsTag) {
98
100
case TAG_FEATURE_BTI:
99
101
return " Tag_Feature_BTI" ;
@@ -106,12 +108,12 @@ StringRef getFeatureAndBitsTagsStr(unsigned FeatureAndBitsTag) {
106
108
return " " ;
107
109
}
108
110
}
109
- FeatureAndBitsTags getFeatureAndBitsTagsID (StringRef FeatureAndBitsTag) {
111
+
112
+ FeatureAndBitsTags
113
+ AArch64BuildAttributes::getFeatureAndBitsTagsID (StringRef FeatureAndBitsTag) {
110
114
return StringSwitch<FeatureAndBitsTags>(FeatureAndBitsTag)
111
115
.Case (" Tag_Feature_BTI" , TAG_FEATURE_BTI)
112
116
.Case (" Tag_Feature_PAC" , TAG_FEATURE_PAC)
113
117
.Case (" Tag_Feature_GCS" , TAG_FEATURE_GCS)
114
118
.Default (FEATURE_AND_BITS_TAG_NOT_FOUND);
115
119
}
116
- } // namespace AArch64BuildAttributes
117
- } // namespace llvm
0 commit comments