!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");
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));
}
}
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);
}