aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
index afd7dcc..72d739c 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
@@ -487,7 +487,7 @@ public:
LastEMSInfo = std::move(LastMappingSymbol->second);
return;
}
- LastEMSInfo.reset(new ElfMappingSymbolInfo(SMLoc(), nullptr, 0));
+ LastEMSInfo.reset(new ElfMappingSymbolInfo);
}
/// This function is the one used to emit instruction data into the ELF
@@ -555,7 +555,7 @@ public:
if (!LastEMSInfo->hasInfo())
return;
ElfMappingSymbolInfo *EMS = LastEMSInfo.get();
- EmitMappingSymbol("$d", EMS->Loc, EMS->F, EMS->Offset);
+ EmitMappingSymbol("$d", SMLoc(), EMS->F, EMS->Offset);
EMS->resetInfo();
}
@@ -625,17 +625,14 @@ private:
};
struct ElfMappingSymbolInfo {
- explicit ElfMappingSymbolInfo(SMLoc Loc, MCFragment *F, uint64_t O)
- : Loc(Loc), F(F), Offset(O), State(EMS_None) {}
void resetInfo() {
F = nullptr;
Offset = 0;
}
bool hasInfo() { return F != nullptr; }
- SMLoc Loc;
- MCFragment *F;
- uint64_t Offset;
- ElfMappingSymbol State;
+ MCFragment *F = nullptr;
+ uint64_t Offset = 0;
+ ElfMappingSymbol State = EMS_None;
};
void emitDataMappingSymbol() {
@@ -648,7 +645,6 @@ private:
auto *DF = dyn_cast_or_null<MCDataFragment>(getCurrentFragment());
if (!DF)
return;
- EMS->Loc = SMLoc();
EMS->F = getCurrentFragment();
EMS->Offset = DF->getContents().size();
LastEMSInfo->State = EMS_Data;