[lld] r247878 - [ELF2] Fix typo in RelocationSection::hasRelocs method

Denis Protivensky via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 02:54:30 PDT 2015


Author: denis-protivensky
Date: Thu Sep 17 04:54:29 2015
New Revision: 247878

URL: http://llvm.org/viewvc/llvm-project?rev=247878&view=rev
Log:
[ELF2] Fix typo in RelocationSection::hasRelocs method

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=247878&r1=247877&r2=247878&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Sep 17 04:54:29 2015
@@ -133,7 +133,7 @@ public:
       ++P;
     }
   }
-  bool hasReocs() const { return !Relocs.empty(); }
+  bool hasRelocs() const { return !Relocs.empty(); }
 
 private:
   std::vector<DynamicReloc<ELFT>> Relocs;
@@ -356,7 +356,7 @@ public:
     Header.sh_link = DynStrSec.getSectionIndex();
 
     unsigned NumEntries = 0;
-    if (RelaDynSec.hasReocs()) {
+    if (RelaDynSec.hasRelocs()) {
       ++NumEntries; // DT_RELA
       ++NumEntries; // DT_RELASZ
     }
@@ -385,7 +385,7 @@ public:
   void writeTo(uint8_t *Buf) override {
     auto *P = reinterpret_cast<Elf_Dyn *>(Buf);
 
-    if (RelaDynSec.hasReocs()) {
+    if (RelaDynSec.hasRelocs()) {
       P->d_tag = DT_RELA;
       P->d_un.d_ptr = RelaDynSec.getVA();
       ++P;
@@ -926,7 +926,7 @@ template <class ELFT> void Writer<ELFT>:
     OutputSections.push_back(&HashSec);
     OutputSections.push_back(&DynamicSec);
     OutputSections.push_back(&DynStrSec);
-    if (RelaDynSec.hasReocs())
+    if (RelaDynSec.hasRelocs())
       OutputSections.push_back(&RelaDynSec);
   }
 




More information about the llvm-commits mailing list