[llvm] 485d7ea - [MC] Remove remnant code related to pending labels
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 22 09:41:38 PDT 2024
Author: Fangrui Song
Date: 2024-06-22T09:41:34-07:00
New Revision: 485d7eaefd93c4f6bc8c51c9a169ffb22ce3a898
URL: https://github.com/llvm/llvm-project/commit/485d7eaefd93c4f6bc8c51c9a169ffb22ce3a898
DIFF: https://github.com/llvm/llvm-project/commit/485d7eaefd93c4f6bc8c51c9a169ffb22ce3a898.diff
LOG: [MC] Remove remnant code related to pending labels
Added:
Modified:
llvm/include/llvm/MC/MCObjectStreamer.h
llvm/lib/MC/MCObjectStreamer.cpp
llvm/lib/MC/MCSection.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCObjectStreamer.h b/llvm/include/llvm/MC/MCObjectStreamer.h
index f4406b255231d..9f6e1aa95f352 100644
--- a/llvm/include/llvm/MC/MCObjectStreamer.h
+++ b/llvm/include/llvm/MC/MCObjectStreamer.h
@@ -43,8 +43,6 @@ class MCObjectStreamer : public MCStreamer {
std::unique_ptr<MCAssembler> Assembler;
bool EmitEHFrame;
bool EmitDebugFrame;
- SmallVector<MCSymbol *, 2> PendingLabels;
- SmallSetVector<MCSection *, 4> PendingLabelSections;
unsigned CurSubsectionIdx = 0;
struct PendingMCFixup {
const MCSymbol *Sym;
@@ -105,12 +103,6 @@ class MCObjectStreamer : public MCStreamer {
protected:
bool changeSectionImpl(MCSection *Section, const MCExpr *Subsection);
- /// If any labels have been emitted but not assigned fragments in the current
- /// Section and Subsection, ensure that they get assigned to fragment F.
- /// Optionally, one can provide an offset \p FOffset as a symbol offset within
- /// the fragment.
- void flushPendingLabels(MCFragment *F, uint64_t FOffset = 0) {}
-
public:
void visitUsedSymbol(const MCSymbol &Sym) override;
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp
index f724973f46449..75506514368a7 100644
--- a/llvm/lib/MC/MCObjectStreamer.cpp
+++ b/llvm/lib/MC/MCObjectStreamer.cpp
@@ -128,8 +128,6 @@ void MCObjectStreamer::reset() {
}
EmitEHFrame = true;
EmitDebugFrame = false;
- PendingLabels.clear();
- PendingLabelSections.clear();
MCStreamer::reset();
}
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp
index 495826efb6a2a..c209c9715f474 100644
--- a/llvm/lib/MC/MCSection.cpp
+++ b/llvm/lib/MC/MCSection.cpp
@@ -79,9 +79,6 @@ void MCSection::switchSubsection(unsigned Subsection) {
StringRef MCSection::getVirtualSectionKind() const { return "virtual"; }
-void MCSection::addPendingLabel(MCSymbol *label, unsigned Subsection) {
-}
-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void MCSection::dump() const {
raw_ostream &OS = errs();
More information about the llvm-commits
mailing list