Skip to content

Commit 88ee42a

Browse files
committed
MCSymbol: Remove the default argument of getFragment
Follow-up to ca5b3a0 ("[MC] Remove SetUsed on isUndefined and getFragment"). The upcoming change will allow .set to reassign non-absolute values, removing `IsUsed`.
1 parent b9d7ef7 commit 88ee42a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/include/llvm/MC/MCSymbol.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ class MCSymbol {
258258
/// isInSection - Check if this symbol is defined in some section (i.e., it
259259
/// is defined but not absolute).
260260
bool isInSection() const {
261-
auto *F = getFragment(0);
261+
auto *F = getFragment();
262262
return F && F != AbsolutePseudoFragment;
263263
}
264264

@@ -399,12 +399,12 @@ class MCSymbol {
399399
return SymbolContents == SymContentsTargetCommon;
400400
}
401401

402-
MCFragment *getFragment(bool SetUsed = false) const {
402+
MCFragment *getFragment() const {
403403
if (Fragment || !isVariable() || isWeakExternal())
404404
return Fragment;
405405
// If the symbol is a non-weak alias, get information about
406406
// the aliasee. (Don't try to resolve weak aliases.)
407-
Fragment = getVariableValue(SetUsed)->findAssociatedFragment();
407+
Fragment = getVariableValue(false)->findAssociatedFragment();
408408
return Fragment;
409409
}
410410

llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ void X86AsmBackend::finishLayout(MCAssembler const &Asm) const {
878878
// disabled by default to eliminate the -g vs non -g difference.
879879
DenseSet<MCFragment *> LabeledFragments;
880880
for (const MCSymbol &S : Asm.symbols())
881-
LabeledFragments.insert(S.getFragment(false));
881+
LabeledFragments.insert(S.getFragment());
882882

883883
for (MCSection &Sec : Asm) {
884884
if (!Sec.isText())

0 commit comments

Comments
 (0)