1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[DWARFYAML] Rename getUsedSectionNames() to getNonEmptySectionNames().

This patch renames getUsedSectionNames() to getNonEmptySectionNames.
NFC.
This commit is contained in:
Xing GUO 2020-07-26 16:01:22 +08:00
parent 57ae573dba
commit 33fdabb077
3 changed files with 4 additions and 4 deletions

View File

@ -225,7 +225,7 @@ struct Data {
bool isEmpty() const;
SetVector<StringRef> getUsedSectionNames() const;
SetVector<StringRef> getNonEmptySectionNames() const;
};
} // end namespace DWARFYAML

View File

@ -22,7 +22,7 @@ bool DWARFYAML::Data::isEmpty() const {
!GNUPubTypes && CompileUnits.empty() && DebugLines.empty();
}
SetVector<StringRef> DWARFYAML::Data::getUsedSectionNames() const {
SetVector<StringRef> DWARFYAML::Data::getNonEmptySectionNames() const {
SetVector<StringRef> SecNames;
if (!DebugStrings.empty())
SecNames.insert("debug_str");

View File

@ -355,7 +355,7 @@ ELFState<ELFT>::ELFState(ELFYAML::Object &D, yaml::ErrorHandler EH)
if (Doc.Symbols)
ImplicitSections.push_back(".symtab");
if (Doc.DWARF)
for (StringRef DebugSecName : Doc.DWARF->getUsedSectionNames()) {
for (StringRef DebugSecName : Doc.DWARF->getNonEmptySectionNames()) {
std::string SecName = ("." + DebugSecName).str();
ImplicitSections.push_back(StringRef(SecName).copy(StringAlloc));
}
@ -931,7 +931,7 @@ void ELFState<ELFT>::initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name,
}
static bool shouldEmitDWARF(DWARFYAML::Data &DWARF, StringRef Name) {
SetVector<StringRef> DebugSecNames = DWARF.getUsedSectionNames();
SetVector<StringRef> DebugSecNames = DWARF.getNonEmptySectionNames();
return Name.consume_front(".") && DebugSecNames.count(Name);
}