@@ -115,14 +115,6 @@ class DataLayout {
115
115
// FIXME: `unsigned char` truncates the value parsed by `parseSpecifier`.
116
116
SmallVector<unsigned char , 8 > LegalIntWidths;
117
117
118
- // / Type specifier used by some internal functions.
119
- enum class TypeSpecifier {
120
- Integer = ' i' ,
121
- Float = ' f' ,
122
- Vector = ' v' ,
123
- Aggregate = ' a'
124
- };
125
-
126
118
// / Primitive type specifications. Sorted and uniqued by type bit width.
127
119
SmallVector<PrimitiveSpec, 6 > IntSpecs;
128
120
SmallVector<PrimitiveSpec, 4 > FloatSpecs;
@@ -145,10 +137,9 @@ class DataLayout {
145
137
// / well-defined bitwise representation.
146
138
SmallVector<unsigned , 8 > NonIntegralAddressSpaces;
147
139
148
- // / Attempts to set the specification for the given type.
149
- // / Returns an error description on failure.
150
- Error setPrimitiveSpec (TypeSpecifier Specifier, uint32_t BitWidth,
151
- Align ABIAlign, Align PrefAlign);
140
+ // / Sets or updates the specification for the given primitive type.
141
+ void setPrimitiveSpec (char Specifier, uint32_t BitWidth, Align ABIAlign,
142
+ Align PrefAlign);
152
143
153
144
// / Searches for a pointer specification that matches the given address space.
154
145
// / Returns the default address space specification if not found.
@@ -164,7 +155,13 @@ class DataLayout {
164
155
// / Internal helper method that returns requested alignment for type.
165
156
Align getAlignment (Type *Ty, bool abi_or_pref) const ;
166
157
167
- // / Attempts to parse a pointer specification ('p').
158
+ // / Attempts to parse primitive specification ('i', 'f', or 'v').
159
+ Error parsePrimitiveSpec (StringRef Spec);
160
+
161
+ // / Attempts to parse aggregate specification ('a').
162
+ Error parseAggregateSpec (StringRef Spec);
163
+
164
+ // / Attempts to parse pointer specification ('p').
168
165
Error parsePointerSpec (StringRef Spec);
169
166
170
167
// / Attempts to parse a single specification.
0 commit comments