]> granicus.if.org Git - llvm/commitdiff
Fix the MSVC build following r212382
authorAlp Toker <alp@nuanti.com>
Sun, 6 Jul 2014 10:54:41 +0000 (10:54 +0000)
committerAlp Toker <alp@nuanti.com>
Sun, 6 Jul 2014 10:54:41 +0000 (10:54 +0000)
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

include/llvm/Object/ELF.h

index 87a8b7af1b1a63a1158573726fc271e1e8aa380b..fbc48e6d7218c3c39640072c81f7c989888e3669 100644 (file)
@@ -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>