summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-03-08 15:34:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-03-08 15:34:04 +0000
commitc86b2cddc8294578162f6d87900e7127b9f99deb (patch)
tree4bf1da30b46f700059678d163b23a0f1ceeafc78
parent9db582a65623ad8035a4e71bcc543b43ec4c2b92 (diff)
downloadbcm5719-llvm-c86b2cddc8294578162f6d87900e7127b9f99deb.tar.gz
bcm5719-llvm-c86b2cddc8294578162f6d87900e7127b9f99deb.zip
Convert a few more uses of uintX_t to uint64_t.
llvm-svn: 297286
-rw-r--r--lld/ELF/InputSection.cpp3
-rw-r--r--lld/ELF/Symbols.cpp6
-rw-r--r--lld/ELF/Writer.cpp8
3 files changed, 7 insertions, 10 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp
index 60b421c0c6a..c9d70ac6215 100644
--- a/lld/ELF/InputSection.cpp
+++ b/lld/ELF/InputSection.cpp
@@ -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
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index 217e5ff1682..390fa684c3f 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -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)
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 6e6f39de39a..a548ca5cf60 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -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;
OpenPOWER on IntegriCloud