Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and writer objects"

I had more unused varibles. This change removes those to get rid of warnings.

llvm-svn: 323493
This commit is contained in:
Jake Ehrlich 2018-01-26 01:48:12 +00:00
parent 8f15218062
commit dc00796119

View File

@ -698,13 +698,13 @@ ELFReader::ELFReader(StringRef File) {
}
ElfType ELFReader::getElfType() const {
if (auto *o = dyn_cast<ELFObjectFile<ELF32LE>>(Binary.get()))
if (isa<ELFObjectFile<ELF32LE>>(Binary.get()))
return ELFT_ELF32LE;
if (auto *o = dyn_cast<ELFObjectFile<ELF64LE>>(Binary.get()))
if (isa<ELFObjectFile<ELF64LE>>(Binary.get()))
return ELFT_ELF64LE;
if (auto *o = dyn_cast<ELFObjectFile<ELF32BE>>(Binary.get()))
if (isa<ELFObjectFile<ELF32BE>>(Binary.get()))
return ELFT_ELF32BE;
if (auto *o = dyn_cast<ELFObjectFile<ELF64BE>>(Binary.get()))
if (isa<ELFObjectFile<ELF64BE>>(Binary.get()))
return ELFT_ELF64BE;
llvm_unreachable("Invalid ELFType");
}