aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCSection.cpp')
-rw-r--r--llvm/lib/MC/MCSection.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp
index 59fdfd7..3a7a8a0 100644
--- a/llvm/lib/MC/MCSection.cpp
+++ b/llvm/lib/MC/MCSection.cpp
@@ -82,15 +82,14 @@ void MCSection::addPendingLabel(MCSymbol *label, unsigned Subsection) {
PendingLabels.push_back(PendingLabel(label, Subsection));
}
-void MCSection::flushPendingLabels(MCFragment *F, uint64_t FOffset,
- unsigned Subsection) {
+void MCSection::flushPendingLabels(MCFragment *F, unsigned Subsection) {
// 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);
+ assert(Label.Sym->getOffset() == 0);
PendingLabels.erase(It--);
}
}
@@ -105,7 +104,7 @@ void MCSection::flushPendingLabels() {
MCFragment *F = new MCDataFragment();
addFragment(*F);
F->setParent(this);
- flushPendingLabels(F, 0, Label.Subsection);
+ flushPendingLabels(F, Label.Subsection);
}
}