mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 11:02:04 +08:00
MCStreamer: Simplify with newFragment. NFC
This commit is contained in:
@@ -161,7 +161,7 @@ void MCMachOStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
|
||||
// We have to create a new fragment if this is an atom defining symbol,
|
||||
// fragments cannot span atoms.
|
||||
if (cast<MCSymbolMachO>(Symbol)->isSymbolLinkerVisible())
|
||||
insert(getContext().allocFragment<MCFragment>());
|
||||
newFragment();
|
||||
|
||||
MCObjectStreamer::emitLabel(Symbol, Loc);
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ void X86AsmBackend::emitInstructionEnd(MCObjectStreamer &OS,
|
||||
// DataFragment, so that we can get the size of instructions later in
|
||||
// MCAssembler::relaxBoundaryAlign. The easiest way is to insert a new empty
|
||||
// DataFragment.
|
||||
OS.insert(OS.getContext().allocFragment<MCFragment>());
|
||||
OS.newFragment();
|
||||
|
||||
// Update the maximum alignment on the current section if necessary.
|
||||
MCSection *Sec = OS.getCurrentSectionOnly();
|
||||
|
||||
Reference in New Issue
Block a user