COFF: Rename Ptr -> Repl.
This pointer points to a replacement for this chunk. Ptr was not a good name. llvm-svn: 248579
This commit is contained in:
parent
80b325c799
commit
de88072a00
|
@ -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::getContents() const {
|
|||
}
|
||||
|
||||
void SectionChunk::replace(SectionChunk *Other) {
|
||||
Other->Ptr = Ptr;
|
||||
Other->Repl = Repl;
|
||||
Other->Live = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue