Skip to content

Commit

Permalink
Reland "[llvm-objcopy] Refactor llvm-objcopy to use reader and writer…
Browse files Browse the repository at this point in the history
… objects"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323493 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jakehehrlich committed Jan 26, 2018
1 parent 6ea62d7 commit 1b9f1fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/llvm-objcopy/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 1b9f1fa

Please sign in to comment.