@@ -217,20 +217,6 @@ class MCSymbolRefExpr : public MCExpr {
217217 // / The symbol being referenced.
218218 const MCSymbol *Symbol;
219219
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-
234220 explicit MCSymbolRefExpr (const MCSymbol *Symbol, VariantKind Kind,
235221 const MCAsmInfo *MAI, SMLoc Loc = SMLoc());
236222
@@ -259,16 +245,8 @@ class MCSymbolRefExpr : public MCExpr {
259245 // Some targets encode the relocation specifier within SymA using
260246 // MCSymbolRefExpr::SubclassData, which is copied to MCValue::Specifier,
261247 // 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 (); }
272250
273251 // / @}
274252
0 commit comments