[llvm] b1731da - [DWARFYAML] Rename getUsedSectionNames() to getNonEmptySectionNames().
Xing GUO via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 26 06:10:55 PDT 2020
Author: Xing GUO
Date: 2020-07-26T21:10:38+08:00
New Revision: b1731da871593a7bd5acad9830dc0797c5e6dec9
URL: https://github.com/llvm/llvm-project/commit/b1731da871593a7bd5acad9830dc0797c5e6dec9
DIFF: https://github.com/llvm/llvm-project/commit/b1731da871593a7bd5acad9830dc0797c5e6dec9.diff
LOG: [DWARFYAML] Rename getUsedSectionNames() to getNonEmptySectionNames().
This patch renames getUsedSectionNames() to getNonEmptySectionNames.
NFC.
Added:
Modified:
llvm/include/llvm/ObjectYAML/DWARFYAML.h
llvm/lib/ObjectYAML/DWARFYAML.cpp
llvm/lib/ObjectYAML/ELFEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ObjectYAML/DWARFYAML.h b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
index 7b18ceebdb1c..88ac404b21b1 100644
--- a/llvm/include/llvm/ObjectYAML/DWARFYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DWARFYAML.h
@@ -225,7 +225,7 @@ struct Data {
bool isEmpty() const;
- SetVector<StringRef> getUsedSectionNames() const;
+ SetVector<StringRef> getNonEmptySectionNames() const;
};
} // end namespace DWARFYAML
diff --git a/llvm/lib/ObjectYAML/DWARFYAML.cpp b/llvm/lib/ObjectYAML/DWARFYAML.cpp
index 186ec8ac4bdc..e5c77bc3721f 100644
--- a/llvm/lib/ObjectYAML/DWARFYAML.cpp
+++ b/llvm/lib/ObjectYAML/DWARFYAML.cpp
@@ -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");
diff --git a/llvm/lib/ObjectYAML/ELFEmitter.cpp b/llvm/lib/ObjectYAML/ELFEmitter.cpp
index fc80839064ee..65b03050c7cd 100644
--- a/llvm/lib/ObjectYAML/ELFEmitter.cpp
+++ b/llvm/lib/ObjectYAML/ELFEmitter.cpp
@@ -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);
}
More information about the llvm-commits
mailing list