[lld] r226972 - ELF: Remove dead code.

Rui Ueyama ruiu at google.com
Fri Jan 23 15:59:39 PST 2015


Author: ruiu
Date: Fri Jan 23 17:59:39 2015
New Revision: 226972

URL: http://llvm.org/viewvc/llvm-project?rev=226972&view=rev
Log:
ELF: Remove dead code.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/ELFFile.h

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=226972&r1=226971&r2=226972&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Fri Jan 23 17:59:39 2015
@@ -194,10 +194,6 @@ protected:
                                            const Elf_Sym *symbol,
                                            const Elf_Shdr *shdr);
 
-  /// \brief Return true if the symbol is corresponding to an architecture
-  /// specific section. We will let the TargetHandler handle such atoms.
-  bool isTargetSpecificAtom(const Elf_Shdr *shdr, const Elf_Sym *sym);
-
   /// \brief Do we want to ignore the section. Ignored sections are
   /// not processed to create atoms
   bool isIgnoredSection(const Elf_Shdr *section);
@@ -221,11 +217,6 @@ protected:
                              const Elf_Sym *symbol,
                              const Elf_Sym *nextSymbol);
 
-  /// Determines if the reader needs to create atoms for the section.
-  bool ignoreCreateAtomsForSection(const Elf_Shdr *shdr) {
-    return false;
-  }
-
   void createEdge(ELFDefinedAtom<ELFT> *from, ELFDefinedAtom<ELFT> *to,
                   uint32_t edgeKind);
 
@@ -612,11 +603,6 @@ std::error_code ELFFile<ELFT>::createSym
 template <class ELFT> std::error_code ELFFile<ELFT>::createAtoms() {
   for (auto &i : _sectionSymbols) {
     const Elf_Shdr *section = i.first;
-
-    // Check if need to create atoms for this section?
-    if (ignoreCreateAtomsForSection(section))
-      continue;
-
     std::vector<Elf_Sym_Iter> &symbols = i.second;
 
     // Sort symbols by position.
@@ -855,14 +841,6 @@ template <class ELFT> void ELFFile<ELFT>
 }
 
 template <class ELFT>
-bool ELFFile<ELFT>::isTargetSpecificAtom(const Elf_Shdr *shdr,
-                                         const Elf_Sym *sym) {
-  return ((shdr && (shdr->sh_flags & llvm::ELF::SHF_MASKPROC)) ||
-          (sym->st_shndx >= llvm::ELF::SHN_LOPROC &&
-           sym->st_shndx <= llvm::ELF::SHN_HIPROC));
-}
-
-template <class ELFT>
 bool ELFFile<ELFT>::isIgnoredSection(const Elf_Shdr *section) {
   switch (section->sh_type) {
   case llvm::ELF::SHT_NOTE:





More information about the llvm-commits mailing list