forked from OSchip/llvm-project
Revert "[MC] Fix quadratic behavior in addPendingLabel()"
This reverts commit e98f73a629
.
This commit is contained in:
parent
03aa967c0d
commit
65fe71be48
|
@ -38,7 +38,7 @@ class MCObjectStreamer : public MCStreamer {
|
|||
bool EmitEHFrame;
|
||||
bool EmitDebugFrame;
|
||||
SmallVector<MCSymbol *, 2> PendingLabels;
|
||||
SmallPtrSet<MCSection *, 4> PendingLabelSections;
|
||||
SmallVector<MCSection*, 2> PendingLabelSections;
|
||||
unsigned CurSubsectionIdx;
|
||||
struct PendingMCFixup {
|
||||
const MCSymbol *Sym;
|
||||
|
|
|
@ -59,8 +59,12 @@ void MCObjectStreamer::addPendingLabel(MCSymbol* S) {
|
|||
CurSection->addPendingLabel(S, CurSubsectionIdx);
|
||||
|
||||
// Add this Section to the list of PendingLabelSections.
|
||||
PendingLabelSections.insert(CurSection);
|
||||
} else
|
||||
auto SecIt = std::find(PendingLabelSections.begin(),
|
||||
PendingLabelSections.end(), CurSection);
|
||||
if (SecIt == PendingLabelSections.end())
|
||||
PendingLabelSections.push_back(CurSection);
|
||||
}
|
||||
else
|
||||
// There is no Section / Subsection for this label yet.
|
||||
PendingLabels.push_back(S);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue