[lld] r248579 - COFF: Rename Ptr -> Repl.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 09:20:24 PDT 2015


Author: ruiu
Date: Fri Sep 25 11:20:24 2015
New Revision: 248579

URL: http://llvm.org/viewvc/llvm-project?rev=248579&view=rev
Log:
COFF: Rename Ptr -> Repl.

This pointer points to a replacement for this chunk. Ptr was not a good name.

Modified:
    lld/trunk/COFF/Chunks.cpp
    lld/trunk/COFF/Chunks.h
    lld/trunk/COFF/Symbols.h

Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=248579&r1=248578&r2=248579&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Fri Sep 25 11:20:24 2015
@@ -28,7 +28,7 @@ namespace lld {
 namespace coff {
 
 SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H)
-    : Chunk(SectionKind), Ptr(this), File(F), Header(H),
+    : Chunk(SectionKind), Repl(this), File(F), Header(H),
       Relocs(File->getCOFFObj()->getRelocations(Header)),
       NumRelocs(std::distance(Relocs.begin(), Relocs.end())) {
   // Initialize SectionName.
@@ -212,7 +212,7 @@ bool SectionChunk::isCOMDAT() const {
 void SectionChunk::printDiscardedMessage() const {
   // Removed by dead-stripping. If it's removed by ICF, ICF already
   // printed out the name, so don't repeat that here.
-  if (Sym && this == Ptr)
+  if (Sym && this == Repl)
     llvm::outs() << "Discarded " << Sym->getName() << "\n";
 }
 
@@ -229,7 +229,7 @@ ArrayRef<uint8_t> SectionChunk::getConte
 }
 
 void SectionChunk::replace(SectionChunk *Other) {
-  Other->Ptr = Ptr;
+  Other->Repl = Repl;
   Other->Live = false;
 }
 

Modified: lld/trunk/COFF/Chunks.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.h?rev=248579&r1=248578&r2=248579&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.h (original)
+++ lld/trunk/COFF/Chunks.h Fri Sep 25 11:20:24 2015
@@ -179,7 +179,7 @@ public:
   // Initially it points to "this" object. If this chunk is merged
   // with other chunk by ICF, it points to another chunk,
   // and this chunk is considrered as dead.
-  SectionChunk *Ptr;
+  SectionChunk *Repl;
 
   // The CRC of the contents as described in the COFF spec 4.5.5.
   // Auxiliary Format 5: Section Definitions. Used for ICF.

Modified: lld/trunk/COFF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Symbols.h?rev=248579&r1=248578&r2=248579&view=diff
==============================================================================
--- lld/trunk/COFF/Symbols.h (original)
+++ lld/trunk/COFF/Symbols.h Fri Sep 25 11:20:24 2015
@@ -166,7 +166,7 @@ protected:
 class DefinedRegular : public DefinedCOFF {
 public:
   DefinedRegular(ObjectFile *F, COFFSymbolRef S, SectionChunk *C)
-      : DefinedCOFF(DefinedRegularKind, F, S), Data(&C->Ptr) {
+      : DefinedCOFF(DefinedRegularKind, F, S), Data(&C->Repl) {
     IsExternal = S.isExternal();
     IsCOMDAT = C->isCOMDAT();
   }




More information about the llvm-commits mailing list