[llvm] r212399 - Fix the MSVC build following r212382
Alp Toker
alp at nuanti.com
Sun Jul 6 03:54:42 PDT 2014
Author: alp
Date: Sun Jul 6 05:54:41 2014
New Revision: 212399
URL: http://llvm.org/viewvc/llvm-project?rev=212399&view=rev
Log:
Fix the MSVC build following r212382
Looks like the casts are needed there after all.
Modified:
llvm/trunk/include/llvm/Object/ELF.h
Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=212399&r1=212398&r2=212399&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Sun Jul 6 05:54:41 2014
@@ -42,8 +42,10 @@ StringRef getELFRelocationTypeName(uint3
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>
More information about the llvm-commits
mailing list