Skip to content

Commit 7722d75

Browse files
committed
[MC] evaluateAsRelocatableImpl: remove the Fixup argument
Follow-up to d6fbffa . This commit updates all call sites and removes the argument from the function.
1 parent ff2ed15 commit 7722d75

File tree

47 files changed

+134
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+134
-164
lines changed

llvm/include/llvm/MC/MCExpr.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,8 @@ class MCExpr {
113113
///
114114
/// \param Res - The relocatable value, if evaluation succeeds.
115115
/// \param Asm - The assembler object to use for evaluating values.
116-
/// \param Fixup - The Fixup object if available.
117116
/// \return - True on success.
118-
bool evaluateAsRelocatable(MCValue &Res, const MCAssembler *Asm,
119-
const MCFixup *Fixup) const;
117+
bool evaluateAsRelocatable(MCValue &Res, const MCAssembler *Asm) const;
120118

121119
/// Try to evaluate the expression to the form (a - b + constant) where
122120
/// neither a nor b are variables.
@@ -557,8 +555,8 @@ class MCTargetExpr : public MCExpr {
557555

558556
public:
559557
virtual void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const = 0;
560-
virtual bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
561-
const MCFixup *Fixup) const = 0;
558+
virtual bool evaluateAsRelocatableImpl(MCValue &Res,
559+
const MCAssembler *Asm) const = 0;
562560
// allow Target Expressions to be checked for equality
563561
virtual bool isEqualTo(const MCExpr *x) const { return false; }
564562
virtual bool isSymbolUsedInExpression(const MCSymbol *Sym) const {

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3862,7 +3862,7 @@ static void handleIndirectSymViaGOTPCRel(AsmPrinter &AP, const MCExpr **ME,
38623862
// cstexpr := <gotequiv> - <foo> + gotpcrelcst, where
38633863
// gotpcrelcst := <offset from @foo base> + <cst>
38643864
MCValue MV;
3865-
if (!(*ME)->evaluateAsRelocatable(MV, nullptr, nullptr) || MV.isAbsolute())
3865+
if (!(*ME)->evaluateAsRelocatable(MV, nullptr) || MV.isAbsolute())
38663866
return;
38673867
const MCSymbolRefExpr *SymA = MV.getSymA();
38683868
if (!SymA)

llvm/lib/MC/MCAssembler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ bool MCAssembler::isThumbFunc(const MCSymbol *Symbol) const {
119119
const MCExpr *Expr = Symbol->getVariableValue();
120120

121121
MCValue V;
122-
if (!Expr->evaluateAsRelocatable(V, nullptr, nullptr))
122+
if (!Expr->evaluateAsRelocatable(V, nullptr))
123123
return false;
124124

125125
if (V.getSymB() || V.getRefKind() != MCSymbolRefExpr::VK_None)
@@ -155,7 +155,7 @@ bool MCAssembler::evaluateFixup(const MCFixup &Fixup, const MCFragment *DF,
155155
MCContext &Ctx = getContext();
156156
Value = 0;
157157
WasForced = false;
158-
if (!Expr->evaluateAsRelocatable(Target, this, &Fixup)) {
158+
if (!Expr->evaluateAsRelocatable(Target, this)) {
159159
Ctx.reportError(Fixup.getLoc(), "expected relocatable expression");
160160
return true;
161161
}

llvm/lib/MC/MCExpr.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ bool MCExpr::evaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm,
286286
}
287287

288288
bool IsRelocatable = evaluateAsRelocatableImpl(Value, Asm, Addrs, InSet);
289-
Res = Value.getConstant();
290-
// Value with RefKind (e.g. %hi(0xdeadbeef) in MIPS) is not considered
289+
Res = Value.getConstant(); // Value with RefKind (e.g. %hi(0xdeadbeef) in
290+
// MIPS) is not considered
291291
// absolute (the value is unknown at parse time), even if it might be resolved
292292
// by evaluateFixup.
293293
return IsRelocatable && Value.isAbsolute() && Value.getRefKind() == 0;
@@ -493,15 +493,12 @@ static bool evaluateSymbolicAdd(const MCAssembler *Asm,
493493
return true;
494494
}
495495

496-
bool MCExpr::evaluateAsRelocatable(MCValue &Res, const MCAssembler *Asm,
497-
const MCFixup *Fixup) const {
496+
bool MCExpr::evaluateAsRelocatable(MCValue &Res, const MCAssembler *Asm) const {
498497
return evaluateAsRelocatableImpl(Res, Asm, nullptr, false);
499498
}
500-
501499
bool MCExpr::evaluateAsValue(MCValue &Res, const MCAssembler &Asm) const {
502500
return evaluateAsRelocatableImpl(Res, &Asm, nullptr, true);
503501
}
504-
505502
static bool canExpand(const MCSymbol &Sym, bool InSet) {
506503
if (Sym.isWeakExternal())
507504
return false;
@@ -524,9 +521,7 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
524521
++stats::MCExprEvaluate;
525522
switch (getKind()) {
526523
case Target:
527-
return cast<MCTargetExpr>(this)->evaluateAsRelocatableImpl(Res, Asm,
528-
nullptr);
529-
524+
return cast<MCTargetExpr>(this)->evaluateAsRelocatableImpl(Res, Asm);
530525
case Constant:
531526
Res = MCValue::get(cast<MCConstantExpr>(this)->getValue());
532527
return true;
@@ -589,7 +584,6 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
589584

590585
if (!AUE->getSubExpr()->evaluateAsRelocatableImpl(Value, Asm, Addrs, InSet))
591586
return false;
592-
593587
switch (AUE->getOpcode()) {
594588
case MCUnaryExpr::LNot:
595589
if (!Value.isAbsolute())

llvm/lib/MC/MCMachOStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void MCMachOStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
181181
void MCMachOStreamer::emitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
182182
MCValue Res;
183183

184-
if (Value->evaluateAsRelocatable(Res, nullptr, nullptr)) {
184+
if (Value->evaluateAsRelocatable(Res, nullptr)) {
185185
if (const MCSymbolRefExpr *SymAExpr = Res.getSymA()) {
186186
const MCSymbol &SymA = SymAExpr->getSymbol();
187187
if (!Res.getSymB() && (SymA.getName() == "" || Res.getConstant() != 0))

llvm/lib/MC/MCObjectStreamer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ getOffsetAndDataFragment(const MCSymbol &Symbol, uint32_t &RelocOffset,
588588
if (Symbol.isVariable()) {
589589
const MCExpr *SymbolExpr = Symbol.getVariableValue();
590590
MCValue OffsetVal;
591-
if(!SymbolExpr->evaluateAsRelocatable(OffsetVal, nullptr, nullptr))
591+
if (!SymbolExpr->evaluateAsRelocatable(OffsetVal, nullptr))
592592
return std::make_pair(false,
593593
std::string("symbol in .reloc offset is not "
594594
"relocatable"));
@@ -662,7 +662,7 @@ MCObjectStreamer::emitRelocDirective(const MCExpr &Offset, StringRef Name,
662662

663663
MCDataFragment *DF = getOrCreateDataFragment(&STI);
664664
MCValue OffsetVal;
665-
if (!Offset.evaluateAsRelocatable(OffsetVal, nullptr, nullptr))
665+
if (!Offset.evaluateAsRelocatable(OffsetVal, nullptr))
666666
return std::make_pair(false,
667667
std::string(".reloc offset is not relocatable"));
668668
if (OffsetVal.isAbsolute()) {

llvm/lib/MC/MCParser/AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3125,7 +3125,7 @@ bool AsmParser::parseDirectiveReloc(SMLoc DirectiveLoc) {
31253125
return true;
31263126

31273127
MCValue Value;
3128-
if (!Expr->evaluateAsRelocatable(Value, nullptr, nullptr))
3128+
if (!Expr->evaluateAsRelocatable(Value, nullptr))
31293129
return Error(ExprLoc, "expression must be relocatable");
31303130
}
31313131

llvm/lib/MC/MCWinCOFFStreamer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class MCCOFFSectionNumberTargetExpr final : public MCTargetExpr {
6666
SectionSymbol.print(OS, MAI);
6767
}
6868

69-
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
70-
const MCFixup *Fixup) const override {
69+
bool evaluateAsRelocatableImpl(MCValue &Res,
70+
const MCAssembler *Asm) const override {
7171
auto sectionNumber = Writer.getSectionNumber(SectionSymbol.getSection());
7272
assert(sectionNumber != 0 &&
7373
"Containing section was not assigned a number");
@@ -102,8 +102,8 @@ class MCCOFFSectionOffsetTargetExpr final : public MCTargetExpr {
102102
Symbol.print(OS, MAI);
103103
}
104104

105-
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
106-
const MCFixup *Fixup) const override {
105+
bool evaluateAsRelocatableImpl(MCValue &Res,
106+
const MCAssembler *Asm) const override {
107107
uint64_t CallsiteOffset = 0;
108108
if (!Asm->getSymbolOffset(Symbol, CallsiteOffset)) {
109109
return true;

llvm/lib/MC/MachObjectWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ uint64_t MachObjectWriter::getSymbolAddress(const MCSymbol &S,
104104
return C->getValue();
105105

106106
MCValue Target;
107-
if (!S.getVariableValue()->evaluateAsRelocatable(Target, &Asm, nullptr))
107+
if (!S.getVariableValue()->evaluateAsRelocatable(Target, &Asm))
108108
report_fatal_error("unable to evaluate offset for variable '" +
109109
S.getName() + "'");
110110

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8226,7 +8226,7 @@ AArch64AsmParser::classifySymbolRef(const MCExpr *Expr,
82268226

82278227
// Check that it looks like a symbol + an addend
82288228
MCValue Res;
8229-
bool Relocatable = Expr->evaluateAsRelocatable(Res, nullptr, nullptr);
8229+
bool Relocatable = Expr->evaluateAsRelocatable(Res, nullptr);
82308230
if (!Relocatable || Res.getSymB())
82318231
return false;
82328232

llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ MCFragment *AArch64MCExpr::findAssociatedFragment() const {
109109
}
110110

111111
bool AArch64MCExpr::evaluateAsRelocatableImpl(MCValue &Res,
112-
const MCAssembler *Asm,
113-
const MCFixup *Fixup) const {
114-
if (!getSubExpr()->evaluateAsRelocatable(Res, Asm, Fixup))
112+
const MCAssembler *Asm) const {
113+
if (!getSubExpr()->evaluateAsRelocatable(Res, Asm))
115114
return false;
116115

117116
Res =
@@ -151,10 +150,9 @@ MCFragment *AArch64AuthMCExpr::findAssociatedFragment() const {
151150
llvm_unreachable("FIXME: what goes here?");
152151
}
153152

154-
bool AArch64AuthMCExpr::evaluateAsRelocatableImpl(MCValue &Res,
155-
const MCAssembler *Asm,
156-
const MCFixup *Fixup) const {
157-
if (!getSubExpr()->evaluateAsRelocatable(Res, Asm, Fixup))
153+
bool AArch64AuthMCExpr::evaluateAsRelocatableImpl(
154+
MCValue &Res, const MCAssembler *Asm) const {
155+
if (!getSubExpr()->evaluateAsRelocatable(Res, Asm))
158156
return false;
159157

160158
if (Res.getSymB())

llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@ class AArch64MCExpr : public MCTargetExpr {
175175

176176
MCFragment *findAssociatedFragment() const override;
177177

178-
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
179-
const MCFixup *Fixup) const override;
180-
178+
bool evaluateAsRelocatableImpl(MCValue &Res,
179+
const MCAssembler *Asm) const override;
181180
static bool classof(const MCExpr *E) {
182181
return E->getKind() == MCExpr::Target;
183182
}
@@ -207,9 +206,8 @@ class AArch64AuthMCExpr final : public AArch64MCExpr {
207206

208207
MCFragment *findAssociatedFragment() const override;
209208

210-
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
211-
const MCFixup *Fixup) const override;
212-
209+
bool evaluateAsRelocatableImpl(MCValue &Res,
210+
const MCAssembler *Asm) const override;
213211
static bool classof(const MCExpr *E) {
214212
return isa<AArch64MCExpr>(E) && classof(cast<AArch64MCExpr>(E));
215213
}

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ static int64_t op(AMDGPUMCExpr::VariantKind Kind, int64_t Arg1, int64_t Arg2) {
9595
}
9696
}
9797

98-
bool AMDGPUMCExpr::evaluateExtraSGPRs(MCValue &Res, const MCAssembler *Asm,
99-
const MCFixup *Fixup) const {
98+
bool AMDGPUMCExpr::evaluateExtraSGPRs(MCValue &Res,
99+
const MCAssembler *Asm) const {
100100
auto TryGetMCExprValue = [&](const MCExpr *Arg, uint64_t &ConstantValue) {
101101
MCValue MCVal;
102-
if (!Arg->evaluateAsRelocatable(MCVal, Asm, Fixup) || !MCVal.isAbsolute())
102+
if (!Arg->evaluateAsRelocatable(MCVal, Asm) || !MCVal.isAbsolute())
103103
return false;
104104

105105
ConstantValue = MCVal.getConstant();
@@ -124,11 +124,11 @@ bool AMDGPUMCExpr::evaluateExtraSGPRs(MCValue &Res, const MCAssembler *Asm,
124124
return true;
125125
}
126126

127-
bool AMDGPUMCExpr::evaluateTotalNumVGPR(MCValue &Res, const MCAssembler *Asm,
128-
const MCFixup *Fixup) const {
127+
bool AMDGPUMCExpr::evaluateTotalNumVGPR(MCValue &Res,
128+
const MCAssembler *Asm) const {
129129
auto TryGetMCExprValue = [&](const MCExpr *Arg, uint64_t &ConstantValue) {
130130
MCValue MCVal;
131-
if (!Arg->evaluateAsRelocatable(MCVal, Asm, Fixup) || !MCVal.isAbsolute())
131+
if (!Arg->evaluateAsRelocatable(MCVal, Asm) || !MCVal.isAbsolute())
132132
return false;
133133

134134
ConstantValue = MCVal.getConstant();
@@ -151,11 +151,10 @@ bool AMDGPUMCExpr::evaluateTotalNumVGPR(MCValue &Res, const MCAssembler *Asm,
151151
return true;
152152
}
153153

154-
bool AMDGPUMCExpr::evaluateAlignTo(MCValue &Res, const MCAssembler *Asm,
155-
const MCFixup *Fixup) const {
154+
bool AMDGPUMCExpr::evaluateAlignTo(MCValue &Res, const MCAssembler *Asm) const {
156155
auto TryGetMCExprValue = [&](const MCExpr *Arg, uint64_t &ConstantValue) {
157156
MCValue MCVal;
158-
if (!Arg->evaluateAsRelocatable(MCVal, Asm, Fixup) || !MCVal.isAbsolute())
157+
if (!Arg->evaluateAsRelocatable(MCVal, Asm) || !MCVal.isAbsolute())
159158
return false;
160159

161160
ConstantValue = MCVal.getConstant();
@@ -172,11 +171,11 @@ bool AMDGPUMCExpr::evaluateAlignTo(MCValue &Res, const MCAssembler *Asm,
172171
return true;
173172
}
174173

175-
bool AMDGPUMCExpr::evaluateOccupancy(MCValue &Res, const MCAssembler *Asm,
176-
const MCFixup *Fixup) const {
174+
bool AMDGPUMCExpr::evaluateOccupancy(MCValue &Res,
175+
const MCAssembler *Asm) const {
177176
auto TryGetMCExprValue = [&](const MCExpr *Arg, uint64_t &ConstantValue) {
178177
MCValue MCVal;
179-
if (!Arg->evaluateAsRelocatable(MCVal, Asm, Fixup) || !MCVal.isAbsolute())
178+
if (!Arg->evaluateAsRelocatable(MCVal, Asm) || !MCVal.isAbsolute())
180179
return false;
181180

182181
ConstantValue = MCVal.getConstant();
@@ -216,25 +215,24 @@ bool AMDGPUMCExpr::evaluateOccupancy(MCValue &Res, const MCAssembler *Asm,
216215
}
217216

218217
bool AMDGPUMCExpr::evaluateAsRelocatableImpl(MCValue &Res,
219-
const MCAssembler *Asm,
220-
const MCFixup *Fixup) const {
218+
const MCAssembler *Asm) const {
221219
std::optional<int64_t> Total;
222220
switch (Kind) {
223221
default:
224222
break;
225223
case AGVK_ExtraSGPRs:
226-
return evaluateExtraSGPRs(Res, Asm, Fixup);
224+
return evaluateExtraSGPRs(Res, Asm);
227225
case AGVK_AlignTo:
228-
return evaluateAlignTo(Res, Asm, Fixup);
226+
return evaluateAlignTo(Res, Asm);
229227
case AGVK_TotalNumVGPRs:
230-
return evaluateTotalNumVGPR(Res, Asm, Fixup);
228+
return evaluateTotalNumVGPR(Res, Asm);
231229
case AGVK_Occupancy:
232-
return evaluateOccupancy(Res, Asm, Fixup);
230+
return evaluateOccupancy(Res, Asm);
233231
}
234232

235233
for (const MCExpr *Arg : Args) {
236234
MCValue ArgRes;
237-
if (!Arg->evaluateAsRelocatable(ArgRes, Asm, Fixup) || !ArgRes.isAbsolute())
235+
if (!Arg->evaluateAsRelocatable(ArgRes, Asm) || !ArgRes.isAbsolute())
238236
return false;
239237

240238
if (!Total.has_value())

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,10 @@ class AMDGPUMCExpr : public MCTargetExpr {
4848
AMDGPUMCExpr(VariantKind Kind, ArrayRef<const MCExpr *> Args, MCContext &Ctx);
4949
~AMDGPUMCExpr();
5050

51-
bool evaluateExtraSGPRs(MCValue &Res, const MCAssembler *Asm,
52-
const MCFixup *Fixup) const;
53-
bool evaluateTotalNumVGPR(MCValue &Res, const MCAssembler *Asm,
54-
const MCFixup *Fixup) const;
55-
bool evaluateAlignTo(MCValue &Res, const MCAssembler *Asm,
56-
const MCFixup *Fixup) const;
57-
bool evaluateOccupancy(MCValue &Res, const MCAssembler *Asm,
58-
const MCFixup *Fixup) const;
51+
bool evaluateExtraSGPRs(MCValue &Res, const MCAssembler *Asm) const;
52+
bool evaluateTotalNumVGPR(MCValue &Res, const MCAssembler *Asm) const;
53+
bool evaluateAlignTo(MCValue &Res, const MCAssembler *Asm) const;
54+
bool evaluateOccupancy(MCValue &Res, const MCAssembler *Asm) const;
5955

6056
public:
6157
static const AMDGPUMCExpr *
@@ -95,8 +91,8 @@ class AMDGPUMCExpr : public MCTargetExpr {
9591
const MCExpr *getSubExpr(size_t Index) const;
9692

9793
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
98-
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
99-
const MCFixup *Fixup) const override;
94+
bool evaluateAsRelocatableImpl(MCValue &Res,
95+
const MCAssembler *Asm) const override;
10096
bool isSymbolUsedInExpression(const MCSymbol *Sym) const override;
10197
void visitUsedExpr(MCStreamer &Streamer) const override;
10298
MCFragment *findAssociatedFragment() const override;

llvm/lib/Target/AMDGPU/Utils/AMDGPUDelayedMCExpr.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static msgpack::DocNode getNode(msgpack::DocNode DN, msgpack::Type Type,
3030
void DelayedMCExprs::assignDocNode(msgpack::DocNode &DN, msgpack::Type Type,
3131
const MCExpr *ExprValue) {
3232
MCValue Res;
33-
if (ExprValue->evaluateAsRelocatable(Res, nullptr, nullptr)) {
33+
if (ExprValue->evaluateAsRelocatable(Res, nullptr)) {
3434
if (Res.isAbsolute()) {
3535
DN = getNode(DN, Type, Res);
3636
return;
@@ -45,8 +45,7 @@ bool DelayedMCExprs::resolveDelayedExpressions() {
4545
Expr DE = DelayedExprs.front();
4646
MCValue Res;
4747

48-
if (!DE.ExprValue->evaluateAsRelocatable(Res, nullptr, nullptr) ||
49-
!Res.isAbsolute())
48+
if (!DE.ExprValue->evaluateAsRelocatable(Res, nullptr) || !Res.isAbsolute())
5049
return false;
5150

5251
DelayedExprs.pop_front();

llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ class ARMMCExpr : public MCTargetExpr {
8181
/// @}
8282

8383
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override;
84-
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
85-
const MCFixup *Fixup) const override {
84+
bool evaluateAsRelocatableImpl(MCValue &Res,
85+
const MCAssembler *Asm) const override {
8686
return false;
8787
}
8888
void visitUsedExpr(MCStreamer &Streamer) const override;

llvm/lib/Target/AVR/MCTargetDesc/AVRMCExpr.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ void AVRMCExpr::printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const {
5353
bool AVRMCExpr::evaluateAsConstant(int64_t &Result) const {
5454
MCValue Value;
5555

56-
bool isRelocatable =
57-
getSubExpr()->evaluateAsRelocatable(Value, nullptr, nullptr);
56+
bool isRelocatable = getSubExpr()->evaluateAsRelocatable(Value, nullptr);
5857

5958
if (!isRelocatable)
6059
return false;
@@ -68,10 +67,9 @@ bool AVRMCExpr::evaluateAsConstant(int64_t &Result) const {
6867
}
6968

7069
bool AVRMCExpr::evaluateAsRelocatableImpl(MCValue &Result,
71-
const MCAssembler *Asm,
72-
const MCFixup *Fixup) const {
70+
const MCAssembler *Asm) const {
7371
MCValue Value;
74-
bool isRelocatable = SubExpr->evaluateAsRelocatable(Value, Asm, Fixup);
72+
bool isRelocatable = SubExpr->evaluateAsRelocatable(Value, Asm);
7573

7674
if (!isRelocatable)
7775
return false;

0 commit comments

Comments
 (0)