File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
lib/Target/AVR/MCTargetDesc Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -495,19 +495,17 @@ class LLVM_ABI MCTargetExpr : public MCExpr {
495495class LLVM_ABI MCSpecifierExpr : public MCExpr {
496496protected:
497497 const MCExpr *Expr;
498- // Target-specific relocation specifier code
499- const Spec specifier;
500498
501499 explicit MCSpecifierExpr (const MCExpr *Expr, Spec S, SMLoc Loc = SMLoc())
502- : MCExpr(Specifier, Loc), Expr(Expr ), specifier(S ) {}
500+ : MCExpr(Specifier, Loc, S ), Expr(Expr ) {}
503501
504502public:
505503 static const MCSpecifierExpr *create (const MCExpr *Expr, Spec S,
506504 MCContext &Ctx, SMLoc Loc = SMLoc());
507505 static const MCSpecifierExpr *create (const MCSymbol *Sym, Spec S,
508506 MCContext &Ctx, SMLoc Loc = SMLoc());
509507
510- Spec getSpecifier () const { return specifier ; }
508+ Spec getSpecifier () const { return getSubclassData () ; }
511509 const MCExpr *getSubExpr () const { return Expr; }
512510
513511 static bool classof (const MCExpr *E) {
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ AVRMCExpr::Specifier AVRMCExpr::parseSpecifier(StringRef Name) {
6363const char *AVRMCExpr::getName () const {
6464 const auto &Modifier =
6565 llvm::find_if (ModifierNames, [this ](ModifierEntry const &Mod) {
66- return Mod.specifier == specifier ;
66+ return Mod.specifier == getSpecifier () ;
6767 });
6868
6969 if (Modifier != std::end (ModifierNames)) {
@@ -75,7 +75,7 @@ const char *AVRMCExpr::getName() const {
7575AVR::Fixups AVRMCExpr::getFixupKind () const {
7676 AVR::Fixups Kind = AVR::Fixups::LastTargetFixupKind;
7777
78- switch (specifier ) {
78+ switch (getSpecifier () ) {
7979 case AVR::S_LO8:
8080 Kind = isNegated () ? AVR::fixup_lo8_ldi_neg : AVR::fixup_lo8_ldi;
8181 break ;
@@ -133,7 +133,7 @@ int64_t AVRMCExpr::evaluateAsInt64(int64_t Value) const {
133133 if (Negated)
134134 Value *= -1 ;
135135
136- switch (specifier ) {
136+ switch (getSpecifier () ) {
137137 case AVR::S_LO8:
138138 Value &= 0xff ;
139139 break ;
You can’t perform that action at this time.
0 commit comments