@@ -487,7 +487,7 @@ class ARMELFStreamer : public MCELFStreamer {
487
487
LastEMSInfo = std::move (LastMappingSymbol->second );
488
488
return ;
489
489
}
490
- LastEMSInfo.reset (new ElfMappingSymbolInfo ( SMLoc (), nullptr , 0 ) );
490
+ LastEMSInfo.reset (new ElfMappingSymbolInfo);
491
491
}
492
492
493
493
// / This function is the one used to emit instruction data into the ELF
@@ -555,7 +555,7 @@ class ARMELFStreamer : public MCELFStreamer {
555
555
if (!LastEMSInfo->hasInfo ())
556
556
return ;
557
557
ElfMappingSymbolInfo *EMS = LastEMSInfo.get ();
558
- EmitMappingSymbol (" $d" , EMS-> Loc , EMS->F , EMS->Offset );
558
+ EmitMappingSymbol (" $d" , SMLoc () , EMS->F , EMS->Offset );
559
559
EMS->resetInfo ();
560
560
}
561
561
@@ -625,17 +625,14 @@ class ARMELFStreamer : public MCELFStreamer {
625
625
};
626
626
627
627
struct ElfMappingSymbolInfo {
628
- explicit ElfMappingSymbolInfo (SMLoc Loc, MCFragment *F, uint64_t O)
629
- : Loc(Loc), F(F), Offset(O), State(EMS_None) {}
630
628
void resetInfo () {
631
629
F = nullptr ;
632
630
Offset = 0 ;
633
631
}
634
632
bool hasInfo () { return F != nullptr ; }
635
- SMLoc Loc;
636
- MCFragment *F;
637
- uint64_t Offset;
638
- ElfMappingSymbol State;
633
+ MCFragment *F = nullptr ;
634
+ uint64_t Offset = 0 ;
635
+ ElfMappingSymbol State = EMS_None;
639
636
};
640
637
641
638
void emitDataMappingSymbol () {
@@ -648,7 +645,6 @@ class ARMELFStreamer : public MCELFStreamer {
648
645
auto *DF = dyn_cast_or_null<MCDataFragment>(getCurrentFragment ());
649
646
if (!DF)
650
647
return ;
651
- EMS->Loc = SMLoc ();
652
648
EMS->F = getCurrentFragment ();
653
649
EMS->Offset = DF->getContents ().size ();
654
650
LastEMSInfo->State = EMS_Data;
0 commit comments