forked from OSchip/llvm-project
[Object] Make IsLittleEndian check constexpr to silence static analyzer dead code warnings.
The "ELFT::TargetEndianness == support::little" check is known at compile time
This commit is contained in:
parent
ac3f967382
commit
37185ceac9
|
@ -1174,7 +1174,7 @@ uint8_t ELFObjectFile<ELFT>::getBytesInAddress() const {
|
|||
|
||||
template <class ELFT>
|
||||
StringRef ELFObjectFile<ELFT>::getFileFormatName() const {
|
||||
bool IsLittleEndian = ELFT::TargetEndianness == support::little;
|
||||
constexpr bool IsLittleEndian = ELFT::TargetEndianness == support::little;
|
||||
switch (EF.getHeader().e_ident[ELF::EI_CLASS]) {
|
||||
case ELF::ELFCLASS32:
|
||||
switch (EF.getHeader().e_machine) {
|
||||
|
|
Loading…
Reference in New Issue