diff options
author | Rui Ueyama <ruiu@google.com> | 2017-02-24 19:52:52 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-02-24 19:52:52 +0000 |
commit | 9cc84384addbec14650adf532fb0b47de57a53d7 (patch) | |
tree | ff9c92e83dfa33b043561acf58639934714b9c13 /lld | |
parent | 004d5245c085e642cd7efc3c0680f245ebb1677e (diff) | |
download | bcm5719-llvm-9cc84384addbec14650adf532fb0b47de57a53d7.tar.gz bcm5719-llvm-9cc84384addbec14650adf532fb0b47de57a53d7.zip |
Use uint64_t instead of uintX_t where the larger type just works.
llvm-svn: 296162
Diffstat (limited to 'lld')
-rw-r--r-- | lld/ELF/InputFiles.cpp | 12 | ||||
-rw-r--r-- | lld/ELF/InputFiles.h | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 418ac061ce2..6f1b75ba3be 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -94,7 +94,7 @@ template <class ELFT> void elf::ObjectFile<ELFT>::initializeDwarfLine() { // using DWARF debug info. template <class ELFT> std::string elf::ObjectFile<ELFT>::getLineInfo(InputSectionBase *S, - uintX_t Offset) { + uint64_t Offset) { if (!DwarfLine) initializeDwarfLine(); @@ -241,14 +241,14 @@ bool elf::ObjectFile<ELFT>::shouldMerge(const Elf_Shdr &Sec) { // the section does not hold a table of fixed-size entries". We know // that Rust 1.13 produces a string mergeable section with a zero // sh_entsize. Here we just accept it rather than being picky about it. - uintX_t EntSize = Sec.sh_entsize; + uint64_t EntSize = Sec.sh_entsize; if (EntSize == 0) return false; if (Sec.sh_size % EntSize) fatal(toString(this) + ": SHF_MERGE section size must be a multiple of sh_entsize"); - uintX_t Flags = Sec.sh_flags; + uint64_t Flags = Sec.sh_flags; if (!(Flags & SHF_MERGE)) return false; if (Flags & SHF_WRITE) @@ -499,8 +499,8 @@ SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) { uint8_t StOther = Sym->st_other; uint8_t Type = Sym->getType(); - uintX_t Value = Sym->st_value; - uintX_t Size = Sym->st_size; + uint64_t Value = Sym->st_value; + uint64_t Size = Sym->st_size; if (Binding == STB_LOCAL) { if (Sym->getType() == STT_FILE) @@ -639,7 +639,7 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() { toString(this) + ": getSectionContentsAsArray failed"); for (const Elf_Dyn &Dyn : Arr) { if (Dyn.d_tag == DT_SONAME) { - uintX_t Val = Dyn.getVal(); + uint64_t Val = Dyn.getVal(); if (Val >= this->StringTable.size()) fatal(toString(this) + ": invalid DT_SONAME entry"); SoName = StringRef(this->StringTable.data() + Val); diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h index 12e3c1e5e64..81a3840c793 100644 --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -138,7 +138,6 @@ template <class ELFT> class ObjectFile : public ELFFileBase<ELFT> { typedef typename ELFT::Shdr Elf_Shdr; typedef typename ELFT::SymRange Elf_Sym_Range; typedef typename ELFT::Word Elf_Word; - typedef typename ELFT::uint uintX_t; StringRef getShtGroupSignature(ArrayRef<Elf_Shdr> Sections, const Elf_Shdr &Sec); @@ -173,7 +172,7 @@ public: // Returns source line information for a given offset. // If no information is available, returns "". - std::string getLineInfo(InputSectionBase *S, uintX_t Offset); + std::string getLineInfo(InputSectionBase *S, uint64_t Offset); // MIPS GP0 value defined by this file. This value represents the gp value // used to create the relocatable object and required to support @@ -277,7 +276,6 @@ template <class ELFT> class SharedFile : public ELFFileBase<ELFT> { typedef typename ELFT::Verdef Elf_Verdef; typedef typename ELFT::Versym Elf_Versym; typedef typename ELFT::Word Elf_Word; - typedef typename ELFT::uint uintX_t; std::vector<StringRef> Undefs; StringRef SoName; |