aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/MC/MCStreamer.h6
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp5
-rw-r--r--llvm/lib/MC/MCStreamer.cpp5
-rw-r--r--llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp2
4 files changed, 3 insertions, 15 deletions
diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h
index fa8e5c6..1d3057a 100644
--- a/llvm/include/llvm/MC/MCStreamer.h
+++ b/llvm/include/llvm/MC/MCStreamer.h
@@ -439,12 +439,6 @@ public:
MCSymbol *endSection(MCSection *Section);
- /// Sets the symbol's section.
- ///
- /// Each emitted symbol will be tracked in the ordering table,
- /// so we can sort on them later.
- void assignFragment(MCSymbol *Symbol, MCFragment *Fragment);
-
/// Returns the mnemonic for \p MI, if the streamer has access to a
/// instruction printer and returns an empty string otherwise.
virtual StringRef getMnemonic(MCInst &MI) { return ""; }
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);
}
}