mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 15:36:58 +00:00
[lld-macho] Remove redundant hasValidData. NFC
lld::macho::runBalancedPartitioning ensures that all sections satisfy `hasValidData`.
This commit is contained in:
parent
f4230b4332
commit
c2f7745b4e
@ -109,9 +109,6 @@ BPSectionBase::reorderSectionsByBalancedPartitioning(
|
||||
|
||||
// Process input sections
|
||||
for (const auto &isec : inputSections) {
|
||||
if (!isec->hasValidData())
|
||||
continue;
|
||||
|
||||
unsigned sectionIdx = sections.size();
|
||||
sectionToIdx.try_emplace(isec->getSection(), sectionIdx);
|
||||
sections.emplace_back(isec.get());
|
||||
@ -371,4 +368,4 @@ BPSectionBase::reorderSectionsByBalancedPartitioning(
|
||||
for (const auto *isec : orderedSections)
|
||||
sectionPriorities[isec] = --highestAvailablePriority;
|
||||
return sectionPriorities;
|
||||
}
|
||||
}
|
||||
|
@ -68,10 +68,6 @@ public:
|
||||
|
||||
bool isCodeSection() const override { return macho::isCodeSection(isec); }
|
||||
|
||||
bool hasValidData() const override {
|
||||
return isec && !isec->data.empty() && isec->data.data();
|
||||
}
|
||||
|
||||
SmallVector<std::unique_ptr<BPSymbol>> getSymbols() const override {
|
||||
SmallVector<std::unique_ptr<BPSymbol>> symbols;
|
||||
for (auto *sym : isec->symbols)
|
||||
|
@ -37,7 +37,6 @@ class BPSectionBase {
|
||||
public:
|
||||
virtual ~BPSectionBase() = default;
|
||||
virtual uint64_t getSize() const = 0;
|
||||
virtual bool hasValidData() const = 0;
|
||||
virtual bool isCodeSection() const = 0;
|
||||
virtual llvm::SmallVector<std::unique_ptr<BPSymbol>> getSymbols() const = 0;
|
||||
virtual const void *getSection() const = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user