[lld] r244747 - [ELF] Remove TargetLayout::getCustomSegments methods

Denis Protivensky via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 06:27:28 PDT 2015


Author: denis-protivensky
Date: Wed Aug 12 08:27:27 2015
New Revision: 244747

URL: http://llvm.org/viewvc/llvm-project?rev=244747&view=rev
Log:
[ELF] Remove TargetLayout::getCustomSegments methods

Modified:
    lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp
    lld/trunk/lib/ReaderWriter/ELF/TargetLayout.h

Modified: lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp?rev=244747&r1=244746&r2=244747&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/TargetLayout.cpp Wed Aug 12 08:27:27 2015
@@ -328,25 +328,11 @@ template <class ELFT> void TargetLayout<
 }
 
 template <class ELFT>
-std::vector<const script::PHDR *>
-TargetLayout<ELFT>::getCustomSegments(const OutputSection<ELFT> *sec) const {
-  return _linkerScriptSema.getPHDRsForOutputSection(sec->name());
-}
-
-template <class ELFT>
-std::vector<const script::PHDR *>
-TargetLayout<ELFT>::getCustomSegments(const Section<ELFT> *section) const {
-  auto sec = section->getOutputSection();
-  assert(sec && "Output section should be already set for input section");
-  return getCustomSegments(sec);
-}
-
-template <class ELFT>
 std::vector<typename TargetLayout<ELFT>::SegmentKey>
 TargetLayout<ELFT>::getSegmentsForSection(const OutputSection<ELFT> *os,
                                           const Section<ELFT> *sec) const {
   std::vector<SegmentKey> segKeys;
-  auto phdrs = getCustomSegments(os);
+  auto phdrs = _linkerScriptSema.getPHDRsForOutputSection(os->name());
   if (!phdrs.empty()) {
     if (phdrs.size() == 1 && phdrs[0]->isNone()) {
       segKeys.emplace_back("NONE", llvm::ELF::PT_NULL, 0, false);

Modified: lld/trunk/lib/ReaderWriter/ELF/TargetLayout.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/TargetLayout.h?rev=244747&r1=244746&r2=244747&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/TargetLayout.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/TargetLayout.h Wed Aug 12 08:27:27 2015
@@ -202,14 +202,6 @@ public:
   // Output sections with the same name into a OutputSection
   void createOutputSections();
 
-  // Query for custom segments of the given section
-  std::vector<const script::PHDR *>
-  getCustomSegments(const Section<ELFT> *section) const;
-
-  // Query for custom segments of the given output section
-  std::vector<const script::PHDR *>
-  getCustomSegments(const OutputSection<ELFT> *sec) const;
-
   // Query for segments based on output and input sections
   std::vector<SegmentKey> getSegmentsForSection(const OutputSection<ELFT> *os,
                                                 const Section<ELFT> *sec) const;




More information about the llvm-commits mailing list