]> granicus.if.org Git - llvm/commitdiff
[llvm-readobj] Change variable names to match LLVM-style. NFC.
authorXing GUO <higuoxing@gmail.com>
Fri, 29 Mar 2019 01:26:36 +0000 (01:26 +0000)
committerXing GUO <higuoxing@gmail.com>
Fri, 29 Mar 2019 01:26:36 +0000 (01:26 +0000)
Summary: This patch helps change variable names to match LLVM-style

Reviewers: jhenderson, Higuoxing

Reviewed By: Higuoxing

Subscribers: rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357230 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-readobj/ELFDumper.cpp

index d2fb2c3ce95e23b1e01b57f58af5675b1e953fe2..8be71b08efc3cc62584ce2cf3acb7ed966e5d7ed 100644 (file)
@@ -228,9 +228,9 @@ private:
   StringRef DynSymtabName;
   ArrayRef<Elf_Word> ShndxTable;
 
-  const Elf_Shdr *dot_gnu_version_sec = nullptr;   // .gnu.version
-  const Elf_Shdr *dot_gnu_version_r_sec = nullptr; // .gnu.version_r
-  const Elf_Shdr *dot_gnu_version_d_sec = nullptr; // .gnu.version_d
+  const Elf_Shdr *SymbolVersionSection = nullptr;   // .gnu.version
+  const Elf_Shdr *SymbolVersionNeedSection = nullptr; // .gnu.version_r
+  const Elf_Shdr *SymbolVersionDefSection = nullptr; // .gnu.version_d
 
   // Records for each version index the corresponding Verdef or Vernaux entry.
   // This is filled the first time LoadVersionMap() is called.
@@ -609,7 +609,7 @@ void ELFDumper<ELFT>::LoadVersionDefs(const Elf_Shdr *sec) const {
 
 template <class ELFT> void ELFDumper<ELFT>::LoadVersionMap() const {
   // If there is no dynamic symtab or version table, there is nothing to do.
-  if (!DynSymRegion.Addr || !dot_gnu_version_sec)
+  if (!DynSymRegion.Addr || !SymbolVersionSection)
     return;
 
   // Has the VersionMap already been loaded?
@@ -621,11 +621,11 @@ template <class ELFT> void ELFDumper<ELFT>::LoadVersionMap() const {
   VersionMap.push_back(VersionMapEntry());
   VersionMap.push_back(VersionMapEntry());
 
-  if (dot_gnu_version_d_sec)
-    LoadVersionDefs(dot_gnu_version_d_sec);
+  if (SymbolVersionDefSection)
+    LoadVersionDefs(SymbolVersionDefSection);
 
-  if (dot_gnu_version_r_sec)
-    LoadVersionNeeds(dot_gnu_version_r_sec);
+  if (SymbolVersionNeedSection)
+    LoadVersionNeeds(SymbolVersionNeedSection);
 }
 
 template <typename ELFT>
@@ -633,7 +633,7 @@ StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab,
                                             const Elf_Sym *Sym,
                                             bool &IsDefault) const {
   // This is a dynamic symbol. Look in the GNU symbol version table.
-  if (!dot_gnu_version_sec) {
+  if (!SymbolVersionSection) {
     // No version table.
     IsDefault = false;
     return "";
@@ -647,7 +647,7 @@ StringRef ELFDumper<ELFT>::getSymbolVersion(StringRef StrTab,
   // Get the corresponding version index entry.
   const Elf_Versym *Versym =
       unwrapOrError(ObjF->getELFFile()->template getEntry<Elf_Versym>(
-          dot_gnu_version_sec, EntryIndex));
+          SymbolVersionSection, EntryIndex));
   return this->getSymbolVersionByIndex(StrTab, Versym->vs_index, IsDefault);
 }
 
@@ -1351,19 +1351,19 @@ ELFDumper<ELFT>::ELFDumper(const object::ELFObjectFile<ELFT> *ObjF,
       ShndxTable = unwrapOrError(Obj->getSHNDXTable(Sec));
       break;
     case ELF::SHT_GNU_versym:
-      if (dot_gnu_version_sec != nullptr)
+      if (SymbolVersionSection != nullptr)
         reportError("Multiple SHT_GNU_versym");
-      dot_gnu_version_sec = &Sec;
+      SymbolVersionSection = &Sec;
       break;
     case ELF::SHT_GNU_verdef:
-      if (dot_gnu_version_d_sec != nullptr)
+      if (SymbolVersionDefSection != nullptr)
         reportError("Multiple SHT_GNU_verdef");
-      dot_gnu_version_d_sec = &Sec;
+      SymbolVersionDefSection = &Sec;
       break;
     case ELF::SHT_GNU_verneed:
-      if (dot_gnu_version_r_sec != nullptr)
+      if (SymbolVersionNeedSection != nullptr)
         reportError("Multiple SHT_GNU_verneed");
-      dot_gnu_version_r_sec = &Sec;
+      SymbolVersionNeedSection = &Sec;
       break;
     case ELF::SHT_LLVM_CALL_GRAPH_PROFILE:
       if (DotCGProfileSec != nullptr)
@@ -1515,15 +1515,15 @@ void ELFDumper<ELFT>::printProgramHeaders(
 template <typename ELFT> void ELFDumper<ELFT>::printVersionInfo() {
   // Dump version symbol section.
   ELFDumperStyle->printVersionSymbolSection(ObjF->getELFFile(),
-                                            dot_gnu_version_sec);
+                                            SymbolVersionSection);
 
   // Dump version definition section.
   ELFDumperStyle->printVersionDefinitionSection(ObjF->getELFFile(),
-                                                dot_gnu_version_d_sec);
+                                                SymbolVersionDefSection);
 
   // Dump version dependency section.
   ELFDumperStyle->printVersionDependencySection(ObjF->getELFFile(),
-                                                dot_gnu_version_r_sec);
+                                                SymbolVersionNeedSection);
 }
 
 template <class ELFT> void ELFDumper<ELFT>::printDynamicRelocations() {