@@ -142,7 +142,7 @@ bool MCAssembler::isThumbFunc(const MCSymbol *Symbol) const {
142
142
return true ;
143
143
}
144
144
145
- bool MCAssembler::evaluateFixup (const MCFragment *DF , const MCFixup &Fixup,
145
+ bool MCAssembler::evaluateFixup (const MCFragment &F , const MCFixup &Fixup,
146
146
MCValue &Target, uint64_t &Value,
147
147
bool RecordReloc,
148
148
MutableArrayRef<char > Contents) const {
@@ -178,7 +178,7 @@ bool MCAssembler::evaluateFixup(const MCFragment *DF, const MCFixup &Fixup,
178
178
bool ShouldAlignPC =
179
179
FixupFlags & MCFixupKindInfo::FKF_IsAlignedDownTo32Bits;
180
180
if (IsPCRel) {
181
- uint64_t Offset = getFragmentOffset (*DF ) + Fixup.getOffset ();
181
+ uint64_t Offset = getFragmentOffset (F ) + Fixup.getOffset ();
182
182
183
183
// A number of ARM fixups in Thumb mode require that the effective PC
184
184
// address be determined as the 32-bit aligned version of the actual
@@ -189,7 +189,7 @@ bool MCAssembler::evaluateFixup(const MCFragment *DF, const MCFixup &Fixup,
189
189
190
190
if (Add && !Sub && !Add->isUndefined () && !Add->isAbsolute ()) {
191
191
IsResolved = getWriter ().isSymbolRefDifferenceFullyResolvedImpl (
192
- *Add, *DF , false , true );
192
+ *Add, F , false , true );
193
193
}
194
194
} else {
195
195
IsResolved = Target.isAbsolute ();
@@ -202,8 +202,8 @@ bool MCAssembler::evaluateFixup(const MCFragment *DF, const MCFixup &Fixup,
202
202
203
203
if (IsResolved && mc::isRelocRelocation (Fixup.getKind ()))
204
204
IsResolved = false ;
205
- IsResolved = getBackend ().addReloc (*DF , Fixup, Target, Value, IsResolved);
206
- getBackend ().applyFixup (*DF , Fixup, Target, Contents, Value, IsResolved);
205
+ IsResolved = getBackend ().addReloc (F , Fixup, Target, Value, IsResolved);
206
+ getBackend ().applyFixup (F , Fixup, Target, Contents, Value, IsResolved);
207
207
return true ;
208
208
}
209
209
@@ -934,7 +934,7 @@ void MCAssembler::layout() {
934
934
for (const MCFixup &Fixup : Fixups) {
935
935
uint64_t FixedValue;
936
936
MCValue Target;
937
- evaluateFixup (& Frag, Fixup, Target, FixedValue,
937
+ evaluateFixup (Frag, Fixup, Target, FixedValue,
938
938
/* RecordReloc=*/ true , Contents);
939
939
}
940
940
}
@@ -951,27 +951,27 @@ void MCAssembler::Finish() {
951
951
assert (PendingErrors.empty ());
952
952
}
953
953
954
- bool MCAssembler::fixupNeedsRelaxation (const MCFixup &Fixup ,
955
- const MCRelaxableFragment *DF ) const {
954
+ bool MCAssembler::fixupNeedsRelaxation (const MCRelaxableFragment &F ,
955
+ const MCFixup &Fixup ) const {
956
956
assert (getBackendPtr () && " Expected assembler backend" );
957
957
MCValue Target;
958
958
uint64_t Value;
959
- bool Resolved = evaluateFixup (DF , const_cast <MCFixup &>(Fixup), Target, Value,
959
+ bool Resolved = evaluateFixup (F , const_cast <MCFixup &>(Fixup), Target, Value,
960
960
/* RecordReloc=*/ false , {});
961
961
return getBackend ().fixupNeedsRelaxationAdvanced (Fixup, Target, Value,
962
962
Resolved);
963
963
}
964
964
965
- bool MCAssembler::fragmentNeedsRelaxation (const MCRelaxableFragment * F) const {
965
+ bool MCAssembler::fragmentNeedsRelaxation (const MCRelaxableFragment & F) const {
966
966
assert (getBackendPtr () && " Expected assembler backend" );
967
967
// If this inst doesn't ever need relaxation, ignore it. This occurs when we
968
968
// are intentionally pushing out inst fragments, or because we relaxed a
969
969
// previous instruction to one that doesn't need relaxation.
970
- if (!getBackend ().mayNeedRelaxation (F-> getInst (), *F-> getSubtargetInfo ()))
970
+ if (!getBackend ().mayNeedRelaxation (F. getInst (), *F. getSubtargetInfo ()))
971
971
return false ;
972
972
973
- for (const MCFixup &Fixup : F-> getFixups ())
974
- if (fixupNeedsRelaxation (Fixup, F ))
973
+ for (const MCFixup &Fixup : F. getFixups ())
974
+ if (fixupNeedsRelaxation (F, Fixup ))
975
975
return true ;
976
976
977
977
return false ;
@@ -980,7 +980,7 @@ bool MCAssembler::fragmentNeedsRelaxation(const MCRelaxableFragment *F) const {
980
980
bool MCAssembler::relaxInstruction (MCRelaxableFragment &F) {
981
981
assert (getEmitterPtr () &&
982
982
" Expected CodeEmitter defined for relaxInstruction" );
983
- if (!fragmentNeedsRelaxation (& F))
983
+ if (!fragmentNeedsRelaxation (F))
984
984
return false ;
985
985
986
986
++stats::RelaxedInstructions;
0 commit comments