File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -444,6 +444,12 @@ class MCFragment {
444444 }
445445
446446 // == FT_LEB functions
447+ void makeLEB (bool IsSigned, const MCExpr *Value) {
448+ assert (Kind == FT_Data);
449+ Kind = MCFragment::FT_LEB;
450+ u.leb .IsSigned = IsSigned;
451+ u.leb .Value = Value;
452+ }
447453 const MCExpr &getLEBValue () const {
448454 assert (Kind == FT_LEB);
449455 return *u.leb .Value ;
@@ -456,10 +462,6 @@ class MCFragment {
456462 assert (Kind == FT_LEB);
457463 return u.leb .IsSigned ;
458464 }
459- void setLEBSigned (bool S) {
460- assert (Kind == FT_LEB);
461- u.leb .IsSigned = S;
462- }
463465
464466 // == FT_DwarfFrame functions
465467 const MCExpr &getDwarfAddrDelta () const {
Original file line number Diff line number Diff line change @@ -215,9 +215,8 @@ void MCObjectStreamer::emitULEB128Value(const MCExpr *Value) {
215215 return ;
216216 }
217217 auto *F = getOrCreateDataFragment ();
218- F->Kind = MCFragment::FT_LEB;
219- F->setLEBSigned (false );
220- F->setLEBValue (Value);
218+ F->makeLEB (false , Value);
219+ newFragment ();
221220}
222221
223222void MCObjectStreamer::emitSLEB128Value (const MCExpr *Value) {
@@ -227,9 +226,8 @@ void MCObjectStreamer::emitSLEB128Value(const MCExpr *Value) {
227226 return ;
228227 }
229228 auto *F = getOrCreateDataFragment ();
230- F->Kind = MCFragment::FT_LEB;
231- F->setLEBSigned (true );
232- F->setLEBValue (Value);
229+ F->makeLEB (true , Value);
230+ newFragment ();
233231}
234232
235233void MCObjectStreamer::emitWeakReference (MCSymbol *Alias,
You can’t perform that action at this time.
0 commit comments