[lld] r297946 - [ELF] - Don't use uintX_t in DynamicReloc<ELFT>. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 04:42:16 PDT 2017
Author: grimar
Date: Thu Mar 16 06:42:16 2017
New Revision: 297946
URL: http://llvm.org/viewvc/llvm-project?rev=297946&view=rev
Log:
[ELF] - Don't use uintX_t in DynamicReloc<ELFT>. NFC.
That allows to detemplate getGotPltOffset/getGotPltVA
methods of SymbolBody and also will help to detemplate
DynamicReloc itself later.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
lld/trunk/ELF/SyntheticSections.h
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=297946&r1=297945&r2=297946&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Thu Mar 16 06:42:16 2017
@@ -1195,7 +1195,7 @@ template <class ELFT> void DynamicSectio
}
template <class ELFT>
-typename ELFT::uint DynamicReloc<ELFT>::getOffset() const {
+typename uint64_t DynamicReloc<ELFT>::getOffset() const {
return InputSec->OutSec->Addr + InputSec->getOffset(OffsetInSec);
}
Modified: lld/trunk/ELF/SyntheticSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.h?rev=297946&r1=297945&r2=297946&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.h (original)
+++ lld/trunk/ELF/SyntheticSections.h Thu Mar 16 06:42:16 2017
@@ -310,16 +310,14 @@ private:
};
template <class ELFT> class DynamicReloc {
- typedef typename ELFT::uint uintX_t;
-
public:
DynamicReloc(uint32_t Type, const InputSectionBase *InputSec,
- uintX_t OffsetInSec, bool UseSymVA, SymbolBody *Sym,
+ uint64_t OffsetInSec, bool UseSymVA, SymbolBody *Sym,
int64_t Addend)
: Type(Type), Sym(Sym), InputSec(InputSec), OffsetInSec(OffsetInSec),
UseSymVA(UseSymVA), Addend(Addend) {}
- uintX_t getOffset() const;
+ uint64_t getOffset() const;
int64_t getAddend() const;
uint32_t getSymIndex() const;
const InputSectionBase *getInputSec() const { return InputSec; }
@@ -329,7 +327,7 @@ public:
private:
SymbolBody *Sym;
const InputSectionBase *InputSec = nullptr;
- uintX_t OffsetInSec;
+ uint64_t OffsetInSec;
bool UseSymVA;
int64_t Addend;
};
More information about the llvm-commits
mailing list