Skip to content

Commit dc89a91

Browse files
committed
MCStreamer: Simplify with newFragment. NFC
1 parent fed6db4 commit dc89a91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/lib/MC/MCMachOStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void MCMachOStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
161161
// We have to create a new fragment if this is an atom defining symbol,
162162
// fragments cannot span atoms.
163163
if (cast<MCSymbolMachO>(Symbol)->isSymbolLinkerVisible())
164-
insert(getContext().allocFragment<MCFragment>());
164+
newFragment();
165165

166166
MCObjectStreamer::emitLabel(Symbol, Loc);
167167

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ void X86AsmBackend::emitInstructionEnd(MCObjectStreamer &OS,
567567
// DataFragment, so that we can get the size of instructions later in
568568
// MCAssembler::relaxBoundaryAlign. The easiest way is to insert a new empty
569569
// DataFragment.
570-
OS.insert(OS.getContext().allocFragment<MCFragment>());
570+
OS.newFragment();
571571

572572
// Update the maximum alignment on the current section if necessary.
573573
MCSection *Sec = OS.getCurrentSectionOnly();

0 commit comments

Comments
 (0)