diff options
author | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2019-12-17 15:03:10 -0800 |
---|---|---|
committer | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2019-12-17 15:04:26 -0800 |
commit | f827aff8598873194bccdfaf469f2dde7e5620d1 (patch) | |
tree | 803d2da455415d33decf477e2303ddd4d1a6ca65 /llvm/lib/MC/MCSection.cpp | |
parent | 6d3f43ec61a60c37963ee5f54289cf0759fb5d61 (diff) | |
download | bcm5719-llvm-f827aff8598873194bccdfaf469f2dde7e5620d1.tar.gz bcm5719-llvm-f827aff8598873194bccdfaf469f2dde7e5620d1.zip |
Revert "[ MC ] Match labels to existing fragments even when switching sections."
This reverts commit 4272372c571cd33edc77a8844b0a224ad7339138.
Caused an MSan buildbot failure. More information available in the patch
that introduced the bug: https://reviews.llvm.org/D71368
Diffstat (limited to 'llvm/lib/MC/MCSection.cpp')
-rw-r--r-- | llvm/lib/MC/MCSection.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp index 7a953054e72..2c892ab8160 100644 --- a/llvm/lib/MC/MCSection.cpp +++ b/llvm/lib/MC/MCSection.cpp @@ -86,41 +86,6 @@ MCSection::getSubsectionInsertionPoint(unsigned Subsection) { return IP; } -void MCSection::addPendingLabel(MCSymbol* label, unsigned Subsection) { - PendingLabels.push_back(PendingLabel(label, Subsection)); -} - -void MCSection::flushPendingLabels(MCFragment *F, uint64_t FOffset, - unsigned Subsection) { - if (PendingLabels.empty()) - return; - - // Set the fragment and fragment offset for all pending symbols in the - // specified Subsection, and remove those symbols from the pending list. - for (auto It = PendingLabels.begin(); It != PendingLabels.end(); ++It) { - PendingLabel& Label = *It; - if (Label.Subsection == Subsection) { - Label.Sym->setFragment(F); - Label.Sym->setOffset(FOffset); - PendingLabels.erase(It--); - } - } -} - -void MCSection::flushPendingLabels() { - // Make sure all remaining pending labels point to data fragments, by - // creating new empty data fragments for each Subsection with labels pending. - while (!PendingLabels.empty()) { - PendingLabel& Label = PendingLabels[0]; - iterator CurInsertionPoint = - this->getSubsectionInsertionPoint(Label.Subsection); - MCFragment *F = new MCDataFragment(); - getFragmentList().insert(CurInsertionPoint, F); - F->setParent(this); - flushPendingLabels(F, 0, Label.Subsection); - } -} - #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MCSection::dump() const { raw_ostream &OS = errs(); |