@@ -119,7 +119,7 @@ void MCObjectStreamer::emitCFISections(bool EH, bool Debug) {
119119void MCObjectStreamer::emitValueImpl (const MCExpr *Value, unsigned Size,
120120 SMLoc Loc) {
121121 MCStreamer::emitValueImpl (Value, Size, Loc);
122- MCFragment *DF = getOrCreateDataFragment ();
122+ MCFragment *DF = getCurrentFragment ();
123123
124124 MCDwarfLineEntry::make (this , getCurrentSectionOnly ());
125125
@@ -168,7 +168,7 @@ void MCObjectStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
168168 // If there is a current fragment, mark the symbol as pointing into it.
169169 // Otherwise queue the label and set its fragment pointer when we emit the
170170 // next fragment.
171- MCFragment *F = getOrCreateDataFragment ();
171+ MCFragment *F = getCurrentFragment ();
172172 Symbol->setFragment (F);
173173 Symbol->setOffset (F->getContents ().size ());
174174
@@ -202,7 +202,7 @@ void MCObjectStreamer::emitULEB128Value(const MCExpr *Value) {
202202 emitULEB128IntValue (IntValue);
203203 return ;
204204 }
205- auto *F = getOrCreateDataFragment ();
205+ auto *F = getCurrentFragment ();
206206 F->makeLEB (false , Value);
207207 newFragment ();
208208}
@@ -213,7 +213,7 @@ void MCObjectStreamer::emitSLEB128Value(const MCExpr *Value) {
213213 emitSLEB128IntValue (IntValue);
214214 return ;
215215 }
216- auto *F = getOrCreateDataFragment ();
216+ auto *F = getCurrentFragment ();
217217 F->makeLEB (true , Value);
218218 newFragment ();
219219}
@@ -312,7 +312,7 @@ void MCObjectStreamer::emitInstruction(const MCInst &Inst,
312312
313313void MCObjectStreamer::emitInstToData (const MCInst &Inst,
314314 const MCSubtargetInfo &STI) {
315- MCFragment *F = getOrCreateDataFragment ();
315+ MCFragment *F = getCurrentFragment ();
316316
317317 // Append the instruction to the data fragment.
318318 size_t FixupStartIndex = F->getFixups ().size ();
@@ -344,7 +344,7 @@ void MCObjectStreamer::emitInstToData(const MCInst &Inst,
344344
345345void MCObjectStreamer::emitInstToFragment (const MCInst &Inst,
346346 const MCSubtargetInfo &STI) {
347- auto *F = getOrCreateDataFragment ();
347+ auto *F = getCurrentFragment ();
348348 SmallVector<char , 16 > Data;
349349 SmallVector<MCFixup, 1 > Fixups;
350350 getAssembler ().getEmitter ().encodeInstruction (Inst, Data, Fixups, STI);
@@ -417,7 +417,7 @@ void MCObjectStreamer::emitDwarfAdvanceLineAddr(int64_t LineDelta,
417417 return ;
418418 }
419419
420- auto *F = getOrCreateDataFragment ();
420+ auto *F = getCurrentFragment ();
421421 F->Kind = MCFragment::FT_Dwarf;
422422 F->setDwarfAddrDelta (buildSymbolDiff (*this , Label, LastLabel, SMLoc ()));
423423 F->setDwarfLineDelta (LineDelta);
@@ -449,7 +449,7 @@ void MCObjectStreamer::emitDwarfLineEndEntry(MCSection *Section,
449449void MCObjectStreamer::emitDwarfAdvanceFrameAddr (const MCSymbol *LastLabel,
450450 const MCSymbol *Label,
451451 SMLoc Loc) {
452- auto *F = getOrCreateDataFragment ();
452+ auto *F = getCurrentFragment ();
453453 F->Kind = MCFragment::FT_DwarfFrame;
454454 F->setDwarfAddrDelta (buildSymbolDiff (*this , Label, LastLabel, Loc));
455455 newFragment ();
@@ -511,7 +511,7 @@ void MCObjectStreamer::emitCVFileChecksumOffsetDirective(unsigned FileNo) {
511511
512512void MCObjectStreamer::emitBytes (StringRef Data) {
513513 MCDwarfLineEntry::make (this , getCurrentSectionOnly ());
514- MCFragment *DF = getOrCreateDataFragment ();
514+ MCFragment *DF = getCurrentFragment ();
515515 DF->appendContents (ArrayRef (Data.data (), Data.size ()));
516516}
517517
0 commit comments