Skip to content

Commit

Permalink
Fix the MSVC build following r212382
Browse files Browse the repository at this point in the history
Looks like the casts are needed there after all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212399 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
atoker committed Jul 6, 2014
1 parent 1508c82 commit bb7ad61
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/llvm/Object/ELF.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type);
inline std::pair<unsigned char, unsigned char>
getElfArchType(StringRef Object) {
if (Object.size() < ELF::EI_NIDENT)
return std::make_pair(ELF::ELFCLASSNONE, ELF::ELFDATANONE);
return std::make_pair(Object[ELF::EI_CLASS], Object[ELF::EI_DATA]);
return std::make_pair((uint8_t)ELF::ELFCLASSNONE,
(uint8_t)ELF::ELFDATANONE);
return std::make_pair((uint8_t)Object[ELF::EI_CLASS],
(uint8_t)Object[ELF::EI_DATA]);
}

template <class ELFT>
Expand Down

0 comments on commit bb7ad61

Please sign in to comment.