21
21
22
22
namespace llvm {
23
23
24
- class AArch64MCExpr : public MCTargetExpr {
24
+ class AArch64MCExpr : public MCSpecifierExpr {
25
25
public:
26
- enum Specifier : uint16_t {
26
+ using Specifier = uint16_t ;
27
+ enum {
27
28
// clang-format off
28
29
None = 0 ,
29
30
// Symbol locations specifying (roughly speaking) what calculation should be
@@ -139,32 +140,13 @@ class AArch64MCExpr : public MCTargetExpr {
139
140
// clang-format on
140
141
};
141
142
142
- private:
143
- const MCExpr *Expr;
144
- const Specifier specifier;
145
-
146
143
protected:
147
144
explicit AArch64MCExpr (const MCExpr *Expr, Specifier S)
148
- : Expr (Expr), specifier( S) {}
145
+ : MCSpecifierExpr (Expr, S) {}
149
146
150
147
public:
151
- // / @name Construction
152
- // / @{
153
-
154
148
static const AArch64MCExpr *create (const MCExpr *Expr, Specifier,
155
149
MCContext &Ctx);
156
-
157
- // / @}
158
- // / @name Accessors
159
- // / @{
160
-
161
- // / Get the kind of this expression.
162
- Specifier getSpecifier () const { return specifier; }
163
-
164
- // / Get the expression this modifier applies to.
165
- const MCExpr *getSubExpr () const { return Expr; }
166
-
167
- // / @}
168
150
// / @name VariantKind information extractors.
169
151
// / @{
170
152
@@ -185,16 +167,8 @@ class AArch64MCExpr : public MCTargetExpr {
185
167
StringRef getSpecifierName () const ;
186
168
187
169
void printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const override ;
188
-
189
- void visitUsedExpr (MCStreamer &Streamer) const override ;
190
-
191
- MCFragment *findAssociatedFragment () const override ;
192
-
193
170
bool evaluateAsRelocatableImpl (MCValue &Res,
194
171
const MCAssembler *Asm) const override ;
195
- static bool classof (const MCExpr *E) {
196
- return E->getKind () == MCExpr::Target;
197
- }
198
172
};
199
173
200
174
class AArch64AuthMCExpr final : public AArch64MCExpr {
@@ -217,10 +191,6 @@ class AArch64AuthMCExpr final : public AArch64MCExpr {
217
191
218
192
void printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const override ;
219
193
220
- void visitUsedExpr (MCStreamer &Streamer) const override ;
221
-
222
- MCFragment *findAssociatedFragment () const override ;
223
-
224
194
static bool classof (const MCExpr *E) {
225
195
return isa<AArch64MCExpr>(E) && classof (cast<AArch64MCExpr>(E));
226
196
}
0 commit comments