[lld] d86435c - [ELF] createInputSection: remove unneeded argument. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 29 16:52:37 PST 2022


Author: Fangrui Song
Date: 2022-01-29T16:52:32-08:00
New Revision: d86435c2301bb51fb7216aca69dda7e38cabf293

URL: https://github.com/llvm/llvm-project/commit/d86435c2301bb51fb7216aca69dda7e38cabf293
DIFF: https://github.com/llvm/llvm-project/commit/d86435c2301bb51fb7216aca69dda7e38cabf293.diff

LOG: [ELF] createInputSection: remove unneeded argument. NFC

Added: 
    

Modified: 
    lld/ELF/InputFiles.cpp
    lld/ELF/InputFiles.h

Removed: 
    


################################################################################
diff  --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 0930df886f06..c01ba9554101 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -603,7 +603,7 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
       if (keepGroup) {
         if (config->relocatable)
           this->sections[i] = createInputSection(
-              i, sec, check(obj.getSectionName(sec, shstrtab)), shstrtab);
+              i, sec, check(obj.getSectionName(sec, shstrtab)));
         selectedGroups.push_back(entries);
         continue;
       }
@@ -627,8 +627,8 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
     case SHT_NULL:
       break;
     default:
-      this->sections[i] = createInputSection(
-          i, sec, check(obj.getSectionName(sec, shstrtab)), shstrtab);
+      this->sections[i] =
+          createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab)));
     }
   }
 
@@ -891,9 +891,9 @@ InputSectionBase *ObjFile<ELFT>::getRelocTarget(uint32_t idx,
 }
 
 template <class ELFT>
-InputSectionBase *
-ObjFile<ELFT>::createInputSection(uint32_t idx, const Elf_Shdr &sec,
-                                  StringRef name, StringRef shstrtab) {
+InputSectionBase *ObjFile<ELFT>::createInputSection(uint32_t idx,
+                                                    const Elf_Shdr &sec,
+                                                    StringRef name) {
   if (sec.sh_type == SHT_ARM_ATTRIBUTES && config->emachine == EM_ARM) {
     ARMAttributeParser attributes;
     ArrayRef<uint8_t> contents = check(this->getObj().getSectionContents(sec));

diff  --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h
index 38e148fe52e1..afe5ca87021c 100644
--- a/lld/ELF/InputFiles.h
+++ b/lld/ELF/InputFiles.h
@@ -289,7 +289,7 @@ template <class ELFT> class ObjFile : public ELFFileBase {
   InputSectionBase *getRelocTarget(uint32_t idx, const Elf_Shdr &sec,
                                    uint32_t info);
   InputSectionBase *createInputSection(uint32_t idx, const Elf_Shdr &sec,
-                                       StringRef name, StringRef shstrtab);
+                                       StringRef name);
 
   bool shouldMerge(const Elf_Shdr &sec, StringRef name);
 


        


More information about the llvm-commits mailing list