diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-02 13:07:38 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-02 13:07:38 +0000 |
| commit | 0ad448c225155dc6416df0673b2bf41991c7c11a (patch) | |
| tree | 1a099cf86551d7e8a878f00b04cb3833bb2e779f | |
| parent | 9d338fbb853454d021522daecb659f17e43653f6 (diff) | |
| download | bcm5719-llvm-0ad448c225155dc6416df0673b2bf41991c7c11a.tar.gz bcm5719-llvm-0ad448c225155dc6416df0673b2bf41991c7c11a.zip | |
getNumSections should return a uintX_t. NFC.
llvm-svn: 285804
| -rw-r--r-- | llvm/include/llvm/Object/ELF.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index 4c3dc2ae809..a2302754bd4 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -37,8 +37,7 @@ template <class ELFT> class ELFFile { public: LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - typedef typename std::conditional<ELFT::Is64Bits, - uint64_t, uint32_t>::type uintX_t; + typedef typename ELFT::uint uintX_t; typedef Elf_Ehdr_Impl<ELFT> Elf_Ehdr; typedef Elf_Shdr_Impl<ELFT> Elf_Shdr; @@ -152,7 +151,7 @@ public: return makeArrayRef(program_header_begin(), program_header_end()); } - uint64_t getNumSections() const; + uintX_t getNumSections() const; ErrorOr<StringRef> getSectionStringTable() const; uint32_t getSectionStringTableIndex() const; uint32_t getExtendedSymbolTableIndex(const Elf_Sym *Sym, @@ -292,7 +291,7 @@ ELFFile<ELFT>::getRelocationSymbol(const Elf_Rel *Rel, } template <class ELFT> -uint64_t ELFFile<ELFT>::getNumSections() const { +typename ELFT::uint ELFFile<ELFT>::getNumSections() const { assert(Header && "Header not initialized!"); if (Header->e_shnum == ELF::SHN_UNDEF && Header->e_shoff > 0) { assert(SectionHeaderTable && "SectionHeaderTable not initialized!"); |

