[llvm] r326005 - [llvm-objcopy] Fix typo in setSymTab

Alexander Shaposhnikov via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 16:41:01 PST 2018


Author: alexshap
Date: Fri Feb 23 16:41:01 2018
New Revision: 326005

URL: http://llvm.org/viewvc/llvm-project?rev=326005&view=rev
Log:
[llvm-objcopy] Fix typo in setSymTab

This diff fixes the name of the argument of 
setSymTab and makes setSymTab/setStrTab private 
(to make the public interface a bit cleaner).

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D43661

Modified:
    llvm/trunk/tools/llvm-objcopy/Object.h

Modified: llvm/trunk/tools/llvm-objcopy/Object.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objcopy/Object.h?rev=326005&r1=326004&r2=326005&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objcopy/Object.h (original)
+++ llvm/trunk/tools/llvm-objcopy/Object.h Fri Feb 23 16:41:01 2018
@@ -343,6 +343,8 @@ struct Symbol {
 class SymbolTableSection : public SectionBase {
   MAKE_SEC_WRITER_FRIEND
 
+  void setStrTab(StringTableSection *StrTab) { SymbolNames = StrTab; }
+
 protected:
   std::vector<std::unique_ptr<Symbol>> Symbols;
   StringTableSection *SymbolNames = nullptr;
@@ -350,7 +352,6 @@ protected:
   using SymPtr = std::unique_ptr<Symbol>;
 
 public:
-  void setStrTab(StringTableSection *StrTab) { SymbolNames = StrTab; }
   void addSymbol(StringRef Name, uint8_t Bind, uint8_t Type,
                  SectionBase *DefinedIn, uint64_t Value, uint8_t Visibility,
                  uint16_t Shndx, uint64_t Sz);
@@ -403,12 +404,12 @@ template <class SymTabType>
 class RelocSectionWithSymtabBase : public RelocationSectionBase {
 private:
   SymTabType *Symbols = nullptr;
+  void setSymTab(SymTabType *SymTab) { Symbols = SymTab; }
 
 protected:
   RelocSectionWithSymtabBase() = default;
 
 public:
-  void setSymTab(SymTabType *StrTab) { Symbols = StrTab; }
   void removeSectionReferences(const SectionBase *Sec) override;
   void initialize(SectionTableRef SecTable) override;
   void finalize() override;




More information about the llvm-commits mailing list