[llvm] 1171bef - [Object] Remove unused variable after D79560. NFC.
Xing GUO via llvm-commits
llvm-commits at lists.llvm.org
Sun May 10 22:07:36 PDT 2020
Author: Xing GUO
Date: 2020-05-11T13:03:53+08:00
New Revision: 1171bef0209de3367ad3837745dbc19e9d0cf1ed
URL: https://github.com/llvm/llvm-project/commit/1171bef0209de3367ad3837745dbc19e9d0cf1ed
DIFF: https://github.com/llvm/llvm-project/commit/1171bef0209de3367ad3837745dbc19e9d0cf1ed.diff
LOG: [Object] Remove unused variable after D79560. NFC.
Added:
Modified:
llvm/lib/Object/ELF.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index c43ddda5bfb6..e60ddf142ac3 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -502,7 +502,6 @@ std::string ELFFile<ELFT>::getDynamicTagAsString(uint64_t Type) const {
template <class ELFT>
Expected<typename ELFT::DynRange> ELFFile<ELFT>::dynamicEntries() const {
ArrayRef<Elf_Dyn> Dyn;
- size_t DynSecSize = 0;
auto ProgramHeadersOrError = program_headers();
if (!ProgramHeadersOrError)
@@ -513,7 +512,6 @@ Expected<typename ELFT::DynRange> ELFFile<ELFT>::dynamicEntries() const {
Dyn = makeArrayRef(
reinterpret_cast<const Elf_Dyn *>(base() + Phdr.p_offset),
Phdr.p_filesz / sizeof(Elf_Dyn));
- DynSecSize = Phdr.p_filesz;
break;
}
}
@@ -532,7 +530,6 @@ Expected<typename ELFT::DynRange> ELFFile<ELFT>::dynamicEntries() const {
if (!DynOrError)
return DynOrError.takeError();
Dyn = *DynOrError;
- DynSecSize = Sec.sh_size;
break;
}
}
More information about the llvm-commits
mailing list