diff --git a/include/llvm/MC/MCObjectStreamer.h b/include/llvm/MC/MCObjectStreamer.h index a4d650b0219..462b3b484c5 100644 --- a/include/llvm/MC/MCObjectStreamer.h +++ b/include/llvm/MC/MCObjectStreamer.h @@ -56,9 +56,6 @@ public: /// Object streamers require the integrated assembler. bool isIntegratedAssemblerRequired() const override { return true; } - void getOrCreateSymbolData(const MCSymbol *Symbol) { - getAssembler().registerSymbol(*Symbol); - } void EmitFrames(MCAsmBackend *MAB); void EmitCFISections(bool EH, bool Debug) override; diff --git a/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp b/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp index a15b1ad808e..70f0cd11b33 100644 --- a/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp +++ b/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp @@ -970,7 +970,7 @@ void ARMTargetELFStreamer::emitLabel(MCSymbol *Symbol) { if (!Streamer.IsThumb) return; - Streamer.getOrCreateSymbolData(Symbol); + Streamer.getAssembler().registerSymbol(*Symbol); unsigned Type = cast(Symbol)->getType(); if (Type == ELF_STT_Func || Type == ELF_STT_GnuIFunc) Streamer.EmitThumbFunc(Symbol); diff --git a/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp b/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp index 1cba713ec8f..d1e3a47f94b 100644 --- a/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp +++ b/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp @@ -43,7 +43,7 @@ void MipsELFStreamer::createPendingLabelRelocs() { if (ELFTargetStreamer->isMicroMipsEnabled()) { for (auto *L : Labels) { auto *Label = cast(L); - getOrCreateSymbolData(Label); + getAssembler().registerSymbol(*Label); // The "other" values are stored in the last 6 bits of the second byte. // The traditional defines for STO values assume the full byte and thus // the shift to pack it. diff --git a/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp b/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp index 8d9f80a7e6f..787d9a7b450 100644 --- a/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp +++ b/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp @@ -457,7 +457,7 @@ void MipsTargetELFStreamer::emitLabel(MCSymbol *S) { auto *Symbol = cast(S); if (!isMicroMipsEnabled()) return; - getStreamer().getOrCreateSymbolData(Symbol); + getStreamer().getAssembler().registerSymbol(*Symbol); uint8_t Type = Symbol->getType(); if (Type != ELF::STT_FUNC) return;