[llvm] r285940 - Delete dead code.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 10:18:31 PDT 2016
Author: rafael
Date: Thu Nov 3 12:18:31 2016
New Revision: 285940
URL: http://llvm.org/viewvc/llvm-project?rev=285940&view=rev
Log:
Delete dead code.
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=285940&r1=285939&r2=285940&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Thu Nov 3 12:18:31 2016
@@ -132,18 +132,11 @@ public:
}
/// \brief Iterate over program header table.
- const Elf_Phdr *program_header_begin() const {
+ const Elf_Phdr_Range program_headers() const {
if (Header->e_phnum && Header->e_phentsize != sizeof(Elf_Phdr))
report_fatal_error("Invalid program header size");
- return reinterpret_cast<const Elf_Phdr *>(base() + Header->e_phoff);
- }
-
- const Elf_Phdr *program_header_end() const {
- return program_header_begin() + Header->e_phnum;
- }
-
- const Elf_Phdr_Range program_headers() const {
- return makeArrayRef(program_header_begin(), program_header_end());
+ auto *Begin = reinterpret_cast<const Elf_Phdr *>(base() + Header->e_phoff);
+ return makeArrayRef(Begin, Begin+Header->e_phnum);
}
ErrorOr<StringRef> getSectionStringTable(Elf_Shdr_Range Sections) const;
More information about the llvm-commits
mailing list