Convert a few more uses of uintX_t to uint64_t.

llvm-svn: 297286
This commit is contained in:
Rafael Espindola 2017-03-08 15:34:04 +00:00
parent 9db582a656
commit c86b2cddc8
3 changed files with 7 additions and 10 deletions

View File

@ -101,7 +101,6 @@ uint64_t InputSectionBase::getOffset() const {
template <class ELFT>
uint64_t InputSectionBase::getOffset(uint64_t Offset) const {
typedef typename ELFT::uint uintX_t;
switch (kind()) {
case Regular:
return cast<InputSection>(this)->OutSecOff + Offset;
@ -109,7 +108,7 @@ uint64_t InputSectionBase::getOffset(uint64_t Offset) const {
// For synthetic sections we treat offset -1 as the end of the section.
// The same approach is used for synthetic symbols (DefinedSynthetic).
return cast<InputSection>(this)->OutSecOff +
(Offset == uintX_t(-1) ? getSize<ELFT>() : Offset);
(Offset == uint64_t(-1) ? getSize<ELFT>() : Offset);
case EHFrame:
// The file crtbeginT.o has relocations pointing to the start of an empty
// .eh_frame that is known to be the first in the link. It does that to

View File

@ -42,15 +42,13 @@ DefinedRegular *ElfSym::MipsGp;
template <class ELFT>
static typename ELFT::uint getSymVA(const SymbolBody &Body, int64_t &Addend) {
typedef typename ELFT::uint uintX_t;
switch (Body.kind()) {
case SymbolBody::DefinedSyntheticKind: {
auto &D = cast<DefinedSynthetic>(Body);
const OutputSection *Sec = D.Section;
if (!Sec)
return D.Value;
if (D.Value == uintX_t(-1))
if (D.Value == uint64_t(-1))
return Sec->Addr + Sec->Size;
return Sec->Addr + D.Value;
}
@ -99,7 +97,7 @@ static typename ELFT::uint getSymVA(const SymbolBody &Body, int64_t &Addend) {
// If you understand the data structures involved with this next
// line (and how they get built), then you have a pretty good
// understanding of the linker.
uintX_t VA = (OutSec ? OutSec->Addr : 0) + IS->getOffset<ELFT>(Offset);
uint64_t VA = (OutSec ? OutSec->Addr : 0) + IS->getOffset<ELFT>(Offset);
if (D.isTls() && !Config->Relocatable) {
if (!Out::TlsPhdr)

View File

@ -734,9 +734,9 @@ void PhdrEntry::add(OutputSection *Sec) {
}
template <class ELFT>
static DefinedSynthetic *
addOptionalSynthetic(StringRef Name, OutputSection *Sec,
typename ELFT::uint Val, uint8_t StOther = STV_HIDDEN) {
static DefinedSynthetic *addOptionalSynthetic(StringRef Name,
OutputSection *Sec, uint64_t Val,
uint8_t StOther = STV_HIDDEN) {
if (SymbolBody *S = Symtab<ELFT>::X->find(Name))
if (!S->isInCurrentDSO())
return cast<DefinedSynthetic>(
@ -756,7 +756,7 @@ static Symbol *addRegular(StringRef Name, InputSectionBase *Sec,
template <class ELFT>
static Symbol *addOptionalRegular(StringRef Name, InputSectionBase *IS,
typename ELFT::uint Value) {
uint64_t Value) {
SymbolBody *S = Symtab<ELFT>::X->find(Name);
if (!S)
return nullptr;