diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/MC/MCAsmStreamer.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp index df5cedb..0050923 100644 --- a/llvm/lib/MC/MCAsmStreamer.cpp +++ b/llvm/lib/MC/MCAsmStreamer.cpp @@ -1080,7 +1080,7 @@ void MCAsmStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size, Align ByteAlignment, SMLoc Loc) { if (Symbol) - assignFragment(Symbol, &Section->getDummyFragment()); + Symbol->setFragment(&Section->getDummyFragment()); // Note: a .zerofill directive does not switch sections. OS << ".zerofill "; @@ -1106,9 +1106,8 @@ void MCAsmStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol, // e.g. _a. void MCAsmStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, Align ByteAlignment) { - assignFragment(Symbol, &Section->getDummyFragment()); + Symbol->setFragment(&Section->getDummyFragment()); - assert(Symbol && "Symbol shouldn't be NULL!"); // Instead of using the Section we'll just use the shortcut. assert(Section->getVariant() == MCSection::SV_MachO && diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 470c673..a3f6794 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -411,11 +411,6 @@ void MCStreamer::initSections(bool NoExecStack, const MCSubtargetInfo &STI) { switchSection(getContext().getObjectFileInfo()->getTextSection()); } -void MCStreamer::assignFragment(MCSymbol *Symbol, MCFragment *Fragment) { - assert(Fragment); - Symbol->setFragment(Fragment); -} - void MCStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) { Symbol->redefineIfPossible(); diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp index 1eaa57e1..53eb361 100644 --- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp +++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp @@ -76,7 +76,7 @@ void PPCELFStreamer::emitPrefixedInstruction(const MCInst &Inst, // label to the top of the fragment containing the aligned instruction that // was just added. if (InstLine == LabelLine) { - assignFragment(LastLabel, InstructionFragment); + LastLabel->setFragment(InstructionFragment); LastLabel->setOffset(0); } } |