Skip to content

Commit b6688a0

Browse files
committed
[MC] flushPendingLabels: revert setAtom change
The setAtom call introduced by e17bc02 was due to my misunderstanding of flushPendingLabels (see https://discourse.llvm.org/t/mc-removing-aligned-bundling-support/79518). When evaluating `.quad x-y`, MCExpr.cpp:AttemptToFoldSymbolOffsetDifference gives different results at parse time and layout time because the `if (FA->getAtom() == FB.getAtom())` condition in isSymbolRefDifferenceFullyResolvedImpl only works when `setAtom` with a non-null pointer has been called. Calling setAtom in flushPendingLabels does not help anything.
1 parent 1365ce2 commit b6688a0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

llvm/lib/MC/MCSection.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,9 @@ void MCSection::flushPendingLabels() {
102102
while (!PendingLabels.empty()) {
103103
PendingLabel& Label = PendingLabels[0];
104104
switchSubsection(Label.Subsection);
105-
const MCSymbol *Atom =
106-
CurFragList->Tail ? CurFragList->Tail->getAtom() : nullptr;
107105
MCFragment *F = new MCDataFragment();
108106
addFragment(*F);
109107
F->setParent(this);
110-
F->setAtom(Atom);
111108
flushPendingLabels(F, 0, Label.Subsection);
112109
}
113110
}

0 commit comments

Comments
 (0)