@@ -217,20 +217,6 @@ class MCSymbolRefExpr : public MCExpr {
217
217
// / The symbol being referenced.
218
218
const MCSymbol *Symbol;
219
219
220
- // Subclass data stores VariantKind in bits 0..15 and HasSubsectionsViaSymbols
221
- // in bit 16.
222
- static const unsigned VariantKindBits = 16 ;
223
- static const unsigned VariantKindMask = (1 << VariantKindBits) - 1 ;
224
-
225
- // FIXME: Remove this bit.
226
- static const unsigned HasSubsectionsViaSymbolsBit = 1 << VariantKindBits;
227
-
228
- static unsigned encodeSubclassData (VariantKind Kind,
229
- bool HasSubsectionsViaSymbols) {
230
- return (unsigned )Kind |
231
- (HasSubsectionsViaSymbols ? HasSubsectionsViaSymbolsBit : 0 );
232
- }
233
-
234
220
explicit MCSymbolRefExpr (const MCSymbol *Symbol, VariantKind Kind,
235
221
const MCAsmInfo *MAI, SMLoc Loc = SMLoc());
236
222
@@ -259,16 +245,8 @@ class MCSymbolRefExpr : public MCExpr {
259
245
// Some targets encode the relocation specifier within SymA using
260
246
// MCSymbolRefExpr::SubclassData, which is copied to MCValue::Specifier,
261
247
// though this method is now deprecated.
262
- VariantKind getKind () const {
263
- return (VariantKind)(getSubclassData () & VariantKindMask);
264
- }
265
- uint16_t getSpecifier () const {
266
- return (getSubclassData () & VariantKindMask);
267
- }
268
-
269
- bool hasSubsectionsViaSymbols () const {
270
- return (getSubclassData () & HasSubsectionsViaSymbolsBit) != 0 ;
271
- }
248
+ VariantKind getKind () const { return VariantKind (getSubclassData ()); }
249
+ uint16_t getSpecifier () const { return getSubclassData (); }
272
250
273
251
// / @}
274
252
0 commit comments