Skip to content

Commit

Permalink
[MC] Maintain MCRelaxAll after reset() (#94945)
Browse files Browse the repository at this point in the history
RelaxAll was set in the constructor, but cleared after reset().
  • Loading branch information
aengelke authored Jun 10, 2024
1 parent baba78d commit 7722082
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/MC/MCObjectStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,11 @@ void MCObjectStreamer::emitAbsoluteSymbolDiffAsULEB128(const MCSymbol *Hi,
}

void MCObjectStreamer::reset() {
if (Assembler)
if (Assembler) {
Assembler->reset();
if (getContext().getTargetOptions())
Assembler->setRelaxAll(getContext().getTargetOptions()->MCRelaxAll);
}
CurInsertionPoint = MCSection::iterator();
EmitEHFrame = true;
EmitDebugFrame = false;
Expand Down

0 comments on commit 7722082

Please sign in to comment.