mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[JITLink] Remove the Section::symbols_empty() method.
llvm::empty(Sec.symbols()) can be used instead.
This commit is contained in:
parent
75d23d9cdb
commit
6b150e9d3c
@ -581,9 +581,6 @@ public:
|
||||
/// Return the number of symbols in this section.
|
||||
SymbolSet::size_type symbols_size() { return Symbols.size(); }
|
||||
|
||||
/// Return true if this section contains no symbols.
|
||||
bool symbols_empty() const { return Symbols.empty(); }
|
||||
|
||||
private:
|
||||
void addSymbol(Symbol &Sym) {
|
||||
assert(!Symbols.count(&Sym) && "Symbol is already in this section");
|
||||
@ -618,7 +615,7 @@ class SectionRange {
|
||||
public:
|
||||
SectionRange() = default;
|
||||
SectionRange(const Section &Sec) {
|
||||
if (Sec.symbols_empty())
|
||||
if (llvm::empty(Sec.symbols()))
|
||||
return;
|
||||
First = Last = *Sec.symbols().begin();
|
||||
for (auto *Sym : Sec.symbols()) {
|
||||
|
@ -90,12 +90,12 @@ Error registerMachOStubsAndGOT(Session &S, LinkGraph &G) {
|
||||
for (auto &Sec : G.sections()) {
|
||||
LLVM_DEBUG({
|
||||
dbgs() << " Section \"" << Sec.getName() << "\": "
|
||||
<< (Sec.symbols_empty() ? "empty. skipping." : "processing...")
|
||||
<< (llvm::empty(Sec.symbols()) ? "empty. skipping." : "processing...")
|
||||
<< "\n";
|
||||
});
|
||||
|
||||
// Skip empty sections.
|
||||
if (Sec.symbols_empty())
|
||||
if (llvm::empty(Sec.symbols()))
|
||||
continue;
|
||||
|
||||
if (FileInfo.SectionInfos.count(Sec.getName()))
|
||||
|
@ -174,11 +174,11 @@ static void dumpSectionContents(raw_ostream &OS, LinkGraph &G) {
|
||||
|
||||
std::sort(Sections.begin(), Sections.end(),
|
||||
[](const Section *LHS, const Section *RHS) {
|
||||
if (LHS->symbols_empty() && RHS->symbols_empty())
|
||||
if (llvm::empty(LHS->symbols()) && llvm::empty(RHS->symbols()))
|
||||
return false;
|
||||
if (LHS->symbols_empty())
|
||||
if (llvm::empty(LHS->symbols()))
|
||||
return false;
|
||||
if (RHS->symbols_empty())
|
||||
if (llvm::empty(RHS->symbols()))
|
||||
return true;
|
||||
SectionRange LHSRange(*LHS);
|
||||
SectionRange RHSRange(*RHS);
|
||||
@ -187,7 +187,7 @@ static void dumpSectionContents(raw_ostream &OS, LinkGraph &G) {
|
||||
|
||||
for (auto *S : Sections) {
|
||||
OS << S->getName() << " content:";
|
||||
if (S->symbols_empty()) {
|
||||
if (llvm::empty(S->symbols())) {
|
||||
OS << "\n section empty\n";
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user