@@ -202,7 +202,7 @@ void MCObjectStreamer::emitValueImpl(const MCExpr *Value, unsigned Size,
202202 DF->getFixups ().push_back (
203203 MCFixup::create (DF->getContents ().size (), Value,
204204 MCFixup::getKindForSize (Size, false ), Loc));
205- DF->getContents (). resize (DF-> getContents (). size () + Size, 0 );
205+ DF->appendContents ( Size, 0 );
206206}
207207
208208MCSymbol *MCObjectStreamer::emitCFILabel () {
@@ -552,7 +552,7 @@ void MCObjectStreamer::emitCVFileChecksumOffsetDirective(unsigned FileNo) {
552552void MCObjectStreamer::emitBytes (StringRef Data) {
553553 MCDwarfLineEntry::make (this , getCurrentSectionOnly ());
554554 MCDataFragment *DF = getOrCreateDataFragment ();
555- DF->getContents (). append (Data.begin (), Data.end ( ));
555+ DF->appendContents ( ArrayRef (Data.data (), Data.size () ));
556556}
557557
558558void MCObjectStreamer::emitValueToAlignment (Align Alignment, int64_t Value,
@@ -586,47 +586,47 @@ void MCObjectStreamer::emitDTPRel32Value(const MCExpr *Value) {
586586 MCDataFragment *DF = getOrCreateDataFragment ();
587587 DF->getFixups ().push_back (MCFixup::create (DF->getContents ().size (),
588588 Value, FK_DTPRel_4));
589- DF->getContents (). resize (DF-> getContents (). size () + 4 , 0 );
589+ DF->appendContents ( 4 , 0 );
590590}
591591
592592// Associate DTPRel64 fixup with data and resize data area
593593void MCObjectStreamer::emitDTPRel64Value (const MCExpr *Value) {
594594 MCDataFragment *DF = getOrCreateDataFragment ();
595595 DF->getFixups ().push_back (MCFixup::create (DF->getContents ().size (),
596596 Value, FK_DTPRel_8));
597- DF->getContents (). resize (DF-> getContents (). size () + 8 , 0 );
597+ DF->appendContents ( 8 , 0 );
598598}
599599
600600// Associate TPRel32 fixup with data and resize data area
601601void MCObjectStreamer::emitTPRel32Value (const MCExpr *Value) {
602602 MCDataFragment *DF = getOrCreateDataFragment ();
603603 DF->getFixups ().push_back (MCFixup::create (DF->getContents ().size (),
604604 Value, FK_TPRel_4));
605- DF->getContents (). resize (DF-> getContents (). size () + 4 , 0 );
605+ DF->appendContents ( 4 , 0 );
606606}
607607
608608// Associate TPRel64 fixup with data and resize data area
609609void MCObjectStreamer::emitTPRel64Value (const MCExpr *Value) {
610610 MCDataFragment *DF = getOrCreateDataFragment ();
611611 DF->getFixups ().push_back (MCFixup::create (DF->getContents ().size (),
612612 Value, FK_TPRel_8));
613- DF->getContents (). resize (DF-> getContents (). size () + 8 , 0 );
613+ DF->appendContents ( 8 , 0 );
614614}
615615
616616// Associate GPRel32 fixup with data and resize data area
617617void MCObjectStreamer::emitGPRel32Value (const MCExpr *Value) {
618618 MCDataFragment *DF = getOrCreateDataFragment ();
619619 DF->getFixups ().push_back (
620620 MCFixup::create (DF->getContents ().size (), Value, FK_GPRel_4));
621- DF->getContents (). resize (DF-> getContents (). size () + 4 , 0 );
621+ DF->appendContents ( 4 , 0 );
622622}
623623
624624// Associate GPRel64 fixup with data and resize data area
625625void MCObjectStreamer::emitGPRel64Value (const MCExpr *Value) {
626626 MCDataFragment *DF = getOrCreateDataFragment ();
627627 DF->getFixups ().push_back (
628628 MCFixup::create (DF->getContents ().size (), Value, FK_GPRel_4));
629- DF->getContents (). resize (DF-> getContents (). size () + 8 , 0 );
629+ DF->appendContents ( 8 , 0 );
630630}
631631
632632static std::optional<std::pair<bool , std::string>>
0 commit comments