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 @@ -443,6 +443,12 @@ class MCFragment {
443
443
}
444
444
445
445
// == FT_LEB functions
446
+ void makeLEB (bool IsSigned, const MCExpr *Value) {
447
+ assert (Kind == FT_Data);
448
+ Kind = MCFragment::FT_LEB;
449
+ u.leb .IsSigned = IsSigned;
450
+ u.leb .Value = Value;
451
+ }
446
452
const MCExpr &getLEBValue () const {
447
453
assert (Kind == FT_LEB);
448
454
return *u.leb .Value ;
@@ -455,10 +461,6 @@ class MCFragment {
455
461
assert (Kind == FT_LEB);
456
462
return u.leb .IsSigned ;
457
463
}
458
- void setLEBSigned (bool S) {
459
- assert (Kind == FT_LEB);
460
- u.leb .IsSigned = S;
461
- }
462
464
463
465
// == FT_DwarfFrame functions
464
466
const MCExpr &getDwarfAddrDelta () const {
Original file line number Diff line number Diff line change @@ -215,9 +215,8 @@ void MCObjectStreamer::emitULEB128Value(const MCExpr *Value) {
215
215
return ;
216
216
}
217
217
auto *F = getOrCreateDataFragment ();
218
- F->Kind = MCFragment::FT_LEB;
219
- F->setLEBSigned (false );
220
- F->setLEBValue (Value);
218
+ F->makeLEB (false , Value);
219
+ newFragment ();
221
220
}
222
221
223
222
void MCObjectStreamer::emitSLEB128Value (const MCExpr *Value) {
@@ -227,9 +226,8 @@ void MCObjectStreamer::emitSLEB128Value(const MCExpr *Value) {
227
226
return ;
228
227
}
229
228
auto *F = getOrCreateDataFragment ();
230
- F->Kind = MCFragment::FT_LEB;
231
- F->setLEBSigned (true );
232
- F->setLEBValue (Value);
229
+ F->makeLEB (true , Value);
230
+ newFragment ();
233
231
}
234
232
235
233
void MCObjectStreamer::emitWeakReference (MCSymbol *Alias,
You can’t perform that action at this time.
0 commit comments