From 51ba5b279e25f6530f2fecd3c648fc4dded85edc Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Sun, 6 Jul 2014 10:54:41 +0000 Subject: [PATCH] Fix the MSVC build following r212382 Looks like the casts are needed there after all. llvm-svn: 212399 --- llvm/include/llvm/Object/ELF.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h index 87a8b7af1b1a..fbc48e6d7218 100644 --- a/llvm/include/llvm/Object/ELF.h +++ b/llvm/include/llvm/Object/ELF.h @@ -42,8 +42,10 @@ StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type); inline std::pair 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