[llvm] r244032 - Drop unnecessary static_cast.

Rafael Espindola rafael.espindola at gmail.com
Wed Aug 5 04:54:00 PDT 2015


Author: rafael
Date: Wed Aug  5 06:53:59 2015
New Revision: 244032

URL: http://llvm.org/viewvc/llvm-project?rev=244032&view=rev
Log:
Drop unnecessary static_cast.

ELFT::TargetEndianness already has the correct type.

Modified:
    llvm/trunk/include/llvm/Object/ELFObjectFile.h

Modified: llvm/trunk/include/llvm/Object/ELFObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFObjectFile.h?rev=244032&r1=244031&r2=244032&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELFObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/ELFObjectFile.h Wed Aug  5 06:53:59 2015
@@ -734,9 +734,7 @@ ELFObjectFile<ELFT>::getRela(DataRefImpl
 template <class ELFT>
 ELFObjectFile<ELFT>::ELFObjectFile(MemoryBufferRef Object, std::error_code &EC)
     : ELFObjectFileBase(
-          getELFType(static_cast<endianness>(ELFT::TargetEndianness) ==
-                         support::little,
-                     ELFT::Is64Bits),
+          getELFType(ELFT::TargetEndianness == support::little, ELFT::Is64Bits),
           Object),
       EF(Data.getBuffer(), EC) {}
 




More information about the llvm-commits mailing list