[llvm] r240784 - Simplify isSymbolList64Bit. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Fri Jun 26 07:11:54 PDT 2015
Author: rafael
Date: Fri Jun 26 09:11:54 2015
New Revision: 240784
URL: http://llvm.org/viewvc/llvm-project?rev=240784&view=rev
Log:
Simplify isSymbolList64Bit. NFC.
Modified:
llvm/trunk/tools/llvm-nm/llvm-nm.cpp
Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=240784&r1=240783&r2=240784&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Fri Jun 26 09:11:54 2015
@@ -250,15 +250,7 @@ static char isSymbolList64Bit(SymbolicFi
return false;
if (MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(&Obj))
return MachO->is64Bit();
- if (isa<ELF32LEObjectFile>(Obj))
- return false;
- if (isa<ELF64LEObjectFile>(Obj))
- return true;
- if (isa<ELF32BEObjectFile>(Obj))
- return false;
- if (isa<ELF64BEObjectFile>(Obj))
- return true;
- return false;
+ return cast<ELFObjectFileBase>(Obj).getBytesInAddress() == 8;
}
static StringRef CurrentFilename;
More information about the llvm-commits
mailing list