[llvm] r285804 - getNumSections should return a uintX_t. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 2 06:07:38 PDT 2016
Author: rafael
Date: Wed Nov 2 08:07:38 2016
New Revision: 285804
URL: http://llvm.org/viewvc/llvm-project?rev=285804&view=rev
Log:
getNumSections should return a uintX_t. NFC.
Modified:
llvm/trunk/include/llvm/Object/ELF.h
Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=285804&r1=285803&r2=285804&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Wed Nov 2 08:07:38 2016
@@ -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
}
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!");
More information about the llvm-commits
mailing list